且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Magento API V2销售订单列表不起作用

更新时间:2023-11-29 22:59:34

大致来说,Magento正在为您创建一个订单集合并尝试加载所有记录.此集合有一条规则,该规则只允许它为每个ID创建一个订单对象,因此,在加载其他对象时,会引发异常.

Roughly, Magento is creating an order collection for you and attempting to load all the records. This collection has a rule that only allows it to create one order object for each ID, so when your additional object is loaded an exception is thrown.

左加盟可能是个问题,但很难说出真相.您能否发布一些有关如何进行API调用的详细信息?不正确的联接通常会出现此问题.

The left joins could be the issue, but it's hard to say off the bat. Could you post a little detail on how you are making the API call? An incorrect join can often have this problem.

如果您使用的是默认代码,那么我的第一个猜测就是数据库中有错误的记录,或者这是一个升级的Magento系统,该系统在过去曾进行过错误的升级.在指向相同数据库的EE版本的干净副本上尝试此操作.如果发生相同的问题,则可能需要在数据库中摸索一下,以寻找导致数据加载问题的原因.由于已经有了查询,因此您可能希望将查询的各个部分分开,以查看某些子查询是否返回了太多数据.

If you're using the default code, my first guess would be that there are erroneous records in the database, or that this is an upgraded Magento system which had a bad upgrade in the past. Try this on a clean copy of your EE version pointing to the same database. If the same problem occurs, you may need to spelunk in the database looking for the reason for the problematic data load. Since you already have the query, you may want to separate out parts of the query to see if some subquery is returning too much data.