I want to get the order details of the customer. For logged in customer i have no problem. But how to get the order details for the guest users.


  • You can't get details from a guest user until we purchase something. Then you can get by his email. Commented Jun 10, 2015 at 12:10
  • upvote for good question
    – Amit Bera
    Commented Jun 10, 2015 at 12:36

1 Answer 1


For guest , magento have it customer_id as null.So you need to sales model by guest email address and magento set a flagcustomer_is_guest =1whenever customer will checkout as guest.

Note: Magento also save Customer email address to sales model table whenever loggin customers are checkout ,so on this case customer_is_guest =1 is importand

    $orderCollection = Mage::getModel("sales/order")->getCollection()
    ->addFieldToFilter('customer_is_guest',1) ->addFieldToSelect('*');
foreach( $orderCollection  as $eachorder){

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.