我想调用Magento SOAP API并获取特定时间段内的订单列表。我可以连接到API并获得所有订单的列表,但我无法(对于我的生活)弄清楚如何过滤结果......任何想法?我的代码,返回所有的订单是...将过滤器添加到Magento Web服务API
$proxy = new SoapClient('http://lalala.freelunchlabs.com/api/v2_soap/?wsdl');
// create authorized session id using api user name and api key
$sessionId = $proxy->login('myusername', 'mypassword');
$filters = array(
'created_at' => array('>' => '2011-04-21 02:13:00'),
'created_at' => array('<' => '2011-04-21 02:22:00')
);
// Get order list
$orderinfo = $proxy->salesOrderList($sessionId,array($filters));
print_r($orderinfo);
在此先感谢!
查
你不能在同一个字段上有两个过滤器 - 这是Magento中的一个错误 – derekdreery 2014-01-24 10:19:08
我们如何为SOAP v1 API实现相同的过滤器? – 2014-08-26 10:51:40