I am using Magento ver.

I am trying to get order detail's for 6-7 orders, want to log their data into (var/log)

What's the best way to do it ?


Use this below code to get multiple order collection :

$orders = Mage::getModel('sales/order')
      ->addAttributeToFilter('entity_id', array('in' => array(6,7)));
  • Does it include shipping address data ? or need to use $orders->getShippingAddress->getData(); ? Nov 25 '20 at 6:32
  • inside foreach of $orders, you will get shipping address data. Nov 25 '20 at 6:47
  • can't we use direct method ? Nov 25 '20 at 6:50
  • Then, you need to load specific order by specific id. If you want to get collection of order by multiple order ids then, you need to run foreach for that. Nov 25 '20 at 6:58
  • ok, i will check. Thankyou Nov 25 '20 at 7:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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