Magento SOAP中的两个日期范围过滤器


How Two date range filters in Magento SOAP

我需要一些关于Magento SOAP (Webservice)中日期范围过滤器的帮助。

<?php
$client = new SoapClient('http://website/index.php/api/v2_soap?wsdl=1');
$apiuser="user";
$apikey="passwd";
$sess_id= $client->login($apiuser, $apikey);
$params = array( 'filter' => array(
array('key' => 'created_at','value' => array(
'from' => '2015-07-13 00:00:00',
'to' => '2015-07-13 23:59:59'))));
$vend=$client->salesOrderList($sess_id, $params);
print_r($vend);
?>

我尝试使用complex_filter,但我得到了一个分割失败。

有人有日期范围过滤器的工作样本吗?用v1还是v2的肥皂更好?

以这种方式发送参数我希望它对你有用

$params = array('complex_filter' => array(
                array(
                    'key' => 'created_at',
                    'value' => array(
                        'key' => 'from',
                        'value' => '2019-01-01 00:00:00'
                    ),
                ),
                    array(
                    'key' => 'created_at',
                    'value' => array(
                        'key' => 'to',
                        'value' => '2019-06-21 23:59:59'
                    ),
                ),
            ));