From time to time everyone finds them selves in a position where they are faced with a development they have never confronted before. Today I was achieve to get all orders for a customer based on the customer email address.. While there are almost certainly several ways to do this, I found a nice query that is quick, and capable.
$orderCollection = Mage::getModel(‘sales/order’)->getCollection(); $orderCollection->addFieldToFilter(‘customer_email’,'email@example.com’);
Happy coding, hope this helps next time you’re working on Magento