0

I'm trying to loop through a lot of order ids and fetching the order data but performing a clearInstance() on an order model variable doesn't seem to clear the data and I keep getting the same data. Has anyone else experienced this? For now I'm having to just use this which uses up way too much memory.

Mage::getModel('sales/order')->load($order['order_id'])
  • Can you please add the code you have tried before? – sv3n May 15 '18 at 18:17
0

You need to unset variable in which you are storing the data of order.

Also you need to check you are passing correct value in $order['order_id']

Reference :http://php.net/manual/en/function.unset.php

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.