Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Can anyone tell me why complex_filter is not working in SOAP V2? 
 
cbartgumag
Jr. Member
 
Total Posts:  3
Joined:  2013-05-16
 

I have this:

$filter = array(array(
\\\’complex_filter\\\’ => array(
array(
\\\’key\\\’ => \\\’order_id\\\’,
\\\’value\\\’ => array(
\\\’key\\\’ => \\\’in\\\’,
\\\’value\\\’ => \\\’7,8,9\\\’
)
)
)
));

and $orders = $client->salesOrderList($session, $filter);

But it doesn\\\’t return the orders, it returns all of them not just the 3 I want. Anyone have an idea on that? V2 is not really as easy to use as V1.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Joduk77
Jr. Member
 
Total Posts:  4
Joined:  2012-12-06
 

I am having the same problem on any complex filters passed to salesOrderList. 
My issue only applies to Magento GO.  In Community ver. 1.7.0.2 - my filters work perfectly.

In GO, the filters seem to be ignored entirely.  I have used fiddler to review the XML being passed.
Here is an example below filtering orders on store_id, status and increment_id

<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><salesOrderListRequestParam xmlns="urn:Magento"><sessionId xmlns="">299e6daa5ef6f31c0ffc2624c503355d</sessionId><filters xmlns=""><complex_filter><complexObjectArray><key>store_id</key><value><key>=</key><value>1</value></value></complexObjectArray><complexObjectArray><key>status</key><value><key>=</key><value>pending</value></value></complexObjectArray><complexObjectArray><key>increment_id</key><value><key>=</key><value>345345</value></value></complexObjectArray></complex_filter></filters></salesOrderListRequestParam></soap:Body></soap:Envelope>

The response includes all orders.  I have also tried using “eq” rather than “=”.
Any help would be greatly appreciated.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top