2016-02-05 30 views
0

我對magento很陌生。我想從Magento下載WSI合規模式的訂單列表,我可以將開始和結束日期傳遞給複雜過濾器。 對於防爆:如何使用複雜過濾器下載Magento Orders WSI合規性模式?

$filters = array(
 
    'complex_filter' => array(
 
    array(
 
     'key' => 'created_at', 
 
     'value' => array('key' => 'from', 'value' => "2015-01-05 00:00:00") 
 
    ), 
 
    array(
 
     'key' => 'created_at', 
 
     'value' => array('key' => 'to', 'value' => "2016-02-05 23:59:59") 
 
    ) 
 
) 
 
);

但是當我調試它在Magento文件:應用程序/代碼/核心/法師/銷售/型號/順序/ Api.php,收到以下過濾器:

stdClass Object 
 
(
 
    [complex_filter] => Array 
 
     (
 
      [created_at] => stdClass Object 
 
       (
 
        [key] => to 
 
        [value] => 2016-02-05 23:59:599 
 
       ) 
 
     ) 
 
)

在它的日期沒有得到顯現在Magento的結束

回答

0

我找到了答案計算器的以下鏈接:

Combined complex filter for ranges

我用下面的代碼:

$complex_filter' => array(
 
    array(
 
    'key' => 'CREATED_AT', 
 
    'value' => array('key' => 'from', 'value' => "2016-02-01 00:00:00") 
 
), 
 
    array(
 
    'key' => 'created_at', 
 
    'value' => array('key' => 'to', 'value' => "2016-02-05 23:59:59") 
 
) 
 
);