Php 为什么Magento salesOrderInvoiceList接受store_id作为复杂筛选器?

Php 为什么Magento salesOrderInvoiceList接受store_id作为复杂筛选器?,php,magento,soap,Php,Magento,Soap,我必须更新另一个程序员创建的代码。 它使用php-SOAP连接Magento。 我在挖掘以了解他做了什么,我发现了一个使用复杂过滤器的查询 根据销售\订单\发票信息。 这是一个复杂的过滤器: $complexFilter = array( 'complex_filter' => array( array( 'key' => 'CREATED_AT', 'value' =&g

我必须更新另一个程序员创建的代码。 它使用php-SOAP连接Magento。 我在挖掘以了解他做了什么,我发现了一个使用复杂过滤器的查询 根据销售\订单\发票信息。 这是一个复杂的过滤器:

$complexFilter = array(            
      'complex_filter' => array(
        array(
               'key' => 'CREATED_AT',
               'value' => array(
                   'key' => 'from',
                   'value' => '2015-10-16 01:24:37'
               )
        ),
        array(
               'key' => 'state',
               'value' => array(
                   'key' => '=',
                   'value' => '2'
               )
        ),
        array(
               'key' => 'store_id',
               'value' => array(
                   'key' => 'in',
                   'value' => '5,6'
               )
        )
      )
);
这是要连接的代码:

$cli = new SoapClient("http://MYstaging.com/api/v2_soap/?wsdl");
$username = 'myuser';
$password = 'myPass';
$session_id = $cli->login($username, $password);
#$cli->__setCookie('XDEBUG_SESSION', 'netbeans-xdebug');      
$result = $cli->salesOrderInvoiceList($session_id, $complexFilter);
正如我们所看到的,查询应该从salesOrderInvoiceList中检索一些信息,而且确实如此。 结果是:

array (size=1)
  0 => 
    object(stdClass)[2]
      public 'increment_id' => string '500000001' (length=9)
      public 'created_at' => string '2015-10-16 20:07:18' (length=19)
      public 'order_currency_code' => string 'YYY' (length=3)
      public 'order_id' => string '9' (length=1)
      public 'state' => string '2' (length=1)
      public 'grand_total' => string '00.0000' (length=7)
      public 'invoice_id' => string '3' (length=1)
我不明白这一点。如果我们检查Magendo doc to,则没有存储id 内容或字段。因此,不可能将其用作过滤器。 但它确实存在于世界上

如果我为根本不存在的东西更改“存储id”字段, 让我们说“诸如此类”吧,我当然不会有任何结果。这就是正在发生的事情。这是有道理的。在幕后,我们可能有一个sql 1054(未知列)错误


有人能解释一下为什么salesOrderInvoiceList接受store_id作为过滤器吗?

好吧,在这里被否决后,我已经在Magento StackExchange中发布了。 结论是,文件中可能存在空白。

$complexFilter = array(            
      'complex_filter' => array(
        array(
               'key' => 'CREATED_AT',
               'value' => array(
                   'key' => 'from',
                   'value' => '2015-10-16 01:24:37'
               )
        ),
        array(
               'key' => 'state',
               'value' => array(
                   'key' => '=',
                   'value' => '2'
               )
        ),
        array(
               'key' => 'BLAH_BLAH',
               'value' => array(
                   'key' => 'in',
                   'value' => '5,6'
               )
        )
      )
);