Magento API订单ID与增量ID [英] Magento API order id vs. increment id

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

问题描述

我发现Magento API中有两个不同的订单属性.

I've found that there are two different properties of the order in Magento API available.

order_id和order_increment_id.对于示例订单,它们可以类似于order_increment_id = 100000080和order_id = 81.

order_id and order_increment_id. For sample order they can be something like order_increment_id=100000080 and order_id=81.

问题是:它们之间有什么区别?如何认为它们被使用?在网上商店的用户界面中,我看到我的订单的订单号" =100000080.order_id属性的作用是什么?

The Question Is: What is the difference between them? How they are considered to be used? In the web store UI I see that my order has "Order #" = 100000080. What is order_id property for?

推荐答案

我使用magento API已有将近一年的时间,可以向您保证,您唯一需要使用的ID是order_increment_id.它用作order.info调用中的主要ID.发票和货运API也是如此-它们还使用适当的增量ID作为主要ID.

I've been working with magento API for almost a year now and can assure you that the only ID you need to use is the order_increment_id. It is used as the main ID in the order.info call. The same is true for the invoice and shipment APIs - they also use the appropriate increment id as the main one.

order_id(我认为与entity_id相同)是用于将所有eav表连接在一起的sales_order表中的主键.它在magento内部使用,但是使用API​​无需担心.

The order_id, which I believe is the same as entity_id, is the primary key in the sales_order table used to join all the eav tables together. It is used internally in magento, but working with the API you needn't worry about it.

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

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