Php 如何在magento api V1中检索客户订单
我使用的是MagentoAPIv1。我想检索特定的客户订单。我正在使用Php 如何在magento api V1中检索客户订单,php,magento,soap,Php,Magento,Soap,我使用的是MagentoAPIv1。我想检索特定的客户订单。我正在使用order.list方法。在这个方法中,我的过滤器不工作。它给我完整的订单列表。我不知道我错在哪里了。这是我的密码 $client = new SoapClient('http://magentohost/api/soap/?wsdl'); $session = $client->login('apiUser', 'apiKey'); $filter = array('filter' => array(arra
order.list
方法。在这个方法中,我的过滤器不工作。它给我完整的订单列表。我不知道我错在哪里了。这是我的密码
$client = new SoapClient('http://magentohost/api/soap/?wsdl');
$session = $client->login('apiUser', 'apiKey');
$filter = array('filter' => array(array('key=' => 'customer_id', 'value' => 210)));
$result = $client->call($session, 'order.list',$filter);
var_dump ($result);
最后我找到了一种检索客户订单的方法
$client = new SoapClient('http://magentohost/api/soap/?wsdl');
$session = $client->login('apiUser', 'apiKey');
$customer_id = 210;
$result = $client->call($session, 'order.list');
if($result)
{
foreach($result as $val)
{
if($customer_id==$val['customer_id'])
{
$res[] = $val;
}
var_dump ($res);
}