在Magento的API V2多complexFilter [英] Multiple complexFilter in Magento's api v2

查看:168
本文介绍了在Magento的API V2多complexFilter的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前我在与使用从C#接口新Magento的肥皂V2一些困难

Currently I’m having some difficulties with using new Magento's soap v2 from c# interface.

用PHP我能够做这样的事:

With php i was able to do something like this:

$params["created_at"]["from"] = date("Y-m-d H:i:s",Functions::convert_time($dataDa));
$params["created_at"]["to"] = date("Y-m-d H:i:s",Functions::convert_time($dataA));
MageInterface::getSingleton()->shipmentList($params);

在此模式下我能发现这是从$ dataDa创建$数据A没有订单列表问题。随着C#但它似乎只有选择的最后一个工作

In this mode i was able to find list of orders which were created from $dataDa to $dataA without problems. With c# however it seems that only the last one of the selectors work.

我的代码:

var cpf = new complexFilter[2];
cpf[0] = new complexFilter
                    {
                        key = "created_at",
                        value = new associativeEntity
                        {
                            key = "to",
                            value = uxDataA.DateTime.ToString("yy-MM-dd HH:mm:ss")
                        }
                    });
cpf[1] = new complexFilter
                    {
                        key = "created_at",
                        value = new associativeEntity
                        {
                            key = "from",
                            value = uxDataDa.DateTime.ToString("yy-MM-dd HH:mm:ss")
                        }
                    });
var filters = new filters();
filters.complex_filter = cpf;
var risultato = mage.salesOrderList(sessionKey, filters);

在此模式下created_at->从标准取考虑(这就像第二个复杂的过滤器覆盖以前一个具有相同的密钥)。想法?

In this mode only created_at->from criteria is taken in consideration (it's like second complex filter override previous one with the same key). Ideas?

感谢。

推荐答案

解决了,有一个错误(或功能?)在mage\sales\order\api\ v2.php

Solved, there was a bug (or the feature?) in mage\sales\order\api\v2.php

请参阅该线程的详细信息:的 http://www.magentocommerce.com/boards/viewthread/70368/

See more info in this thread: http://www.magentocommerce.com/boards/viewthread/70368/

这篇关于在Magento的API V2多complexFilter的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆