【发布时间】:2014-02-07 19:12:46
【问题描述】:
我正在从 Magento 商店获取销售报告以使用 SOAP API。这工作正常,但这显示了所有销售报告。我想要自定义报告,例如通过特定月份或日期。 这怎么可能我的代码如下。
$mage_url = 'https://domain.com/index.php/api/soap/index/wsdl/1';
$mage_user = 'Mohammad';
$mage_api_key = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
// Initialize the SOAP client
$soap = new SoapClient( $mage_url );
// Login to Magento
$session_id = $soap->login( $mage_user, $mage_api_key );
// Start a session to make API requests
$resources = $soap->resources( $session_id );
$products = $soap->call($session_id, 'sales_order.list');
这对开发人员也很有用
【问题讨论】: