我重写了Magento Core(M1.9)的Api模型,并且想测试它的工作原理。它也返回可能的记录,我想在我的测试中设置条件,如Sql“order BY Desc | Asc”和“LIMIT”。但我不知道我应该在哪里提到的条件。 这里是我的测试代码:SOAP API中的ASC和DESC条件magento 1.9
$username = 'testapi';
$apikey= 'password';
$client = new Zend_XMLRPC_Client('https://www.magentohost.com/index.php/api/xmlrpc');
$session = $client->call('login', array($username, $apikey));
$filters = array(
array(
'category_id' => 163,
'internal_rating' => 6
//array('product_id'=>'Order by ASC')
));
try {
$message = $client->call('call', array($session, 'catalog_product.list', $filters));
var_dump($message);
} catch (Exception $fault) {
echo $fault->getMessage();
}
我可以理解任何意见
谢谢你Aleks。我之前尝试过这种方式,但这并不成功。 –