<?php
$orders = Mage::getModel('sales/order')
->getCollection()
->addFieldToFilter('store_id', Mage::app()->getStore()->getId())
//->addAttributeToFilter('status', Mage_Sales_Model_Order::STATE_COMPLETE)
->addAttributeToFilter('customer_email', $email)// guest email id for filter
->addAttributeToSort('entity_id', 'DESC');
foreach($orders as $order) {
$guest_email = $order->getCustomerEmail();
}
?>
$orders = Mage::getModel('sales/order')
->getCollection()
->addFieldToFilter('store_id', Mage::app()->getStore()->getId())
//->addAttributeToFilter('status', Mage_Sales_Model_Order::STATE_COMPLETE)
->addAttributeToFilter('customer_email', $email)// guest email id for filter
->addAttributeToSort('entity_id', 'DESC');
foreach($orders as $order) {
$guest_email = $order->getCustomerEmail();
}
?>
No comments:
Post a Comment