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'])
1
  • Can you please add the code you have tried before?
    – sv3n
    May 15, 2018 at 18:17

1 Answer 1

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

2

Your Answer

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

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