如何在 commercetools 中在产品被订购后使用库存扣减产品数量?

huangapple go评论163阅读模式
英文:

How to deduct product quantity using inventory after it is getting ordered in commercetools?

问题

更改库存模式为仅跟踪,
税务模式为平台

英文:

[如何在 commercetools 中在产品被订购后使用库存扣减产品数量?]

changing inventory mode to Track only,
tax mode to Platform

答案1

得分: 2

The cart must have inventoryMode set to TrackOnly or ReserveOnOrder.
You can find more details in the documentation below.

https://docs.commercetools.com/api/projects/carts#cart
https://docs.commercetools.com/api/projects/carts#inventorymode

英文:

The cart must have inventoryMode set to TrackOnly or ReserveOnOrder.
You can find more details in the documentation below.

https://docs.commercetools.com/api/projects/carts#cart
https://docs.commercetools.com/api/projects/carts#inventorymode

答案2

得分: 0

-For this inventory must be added.
-这需要添加库存。

-You can call inventory api and reduce the quantity which ever quantity has been ordered using line_item_id.
-您可以调用库存 API 并根据 line_item_id 减少已下订单的数量。

-It will be reflect in inventory section.
-这将反映在库存部分。

-Always check quantity on checkout page while placing an order for every product for that you can create one function which will give you product data with available quantity and you can check that with availability value.
-在下订单时始终在结账页面上检查每种产品的数量,为此您可以创建一个函数,该函数将为您提供带有可用数量的产品数据,您可以使用可用性值进行检查。

英文:

-For this inventory must be added.

-You can call inventory api and reduce the quantity which ever quantity has been ordered using line_item_id.

-It will be reflect in inventory section.

-Always check quantity on checkout page while placing an order for every product for that you can create one function which will give you product data with available quantity and you can check that with availability value.

huangapple
  • 本文由 发表于 2023年4月11日 14:57:20
  • 转载请务必保留本文链接:https://go.coder-hub.com/75983167.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定