I'm using the SOAP v2 API to pull a list of orders with the following filters:
$params = array( array('key' => 'state', 'value' => 'processing') ); $complex_params =array( array('key'=>'created_at','value'=>array('key' =>'from','value' => $dateFrom)) // GMT ); $orders = $this->client->salesOrderList($this->session, array('filter' => $params, 'complex_filter' => $complex_params));
This works 95% of the time. Once every couple of days the API will ignore the date range and state filters and return all the orders. This can cause problems as it will return all orders! It returns so many orders with some stores that it hits my PHP memory limit.
Has anyone else run into this before? Is there anything that can be done (other than raise the PHP memory limit)?
I never found a consistent solution to this. I've communicated with many different Magento installations over the years and only some had this issue but I was never able to pinpoint the root cause. For Magento I just always double check the result data.