Shopify API CARTS - 更改 line_item line_price 以覆盖价格 [英] Shopify API CARTS - Changing line_item line_price for price Override

查看:39
本文介绍了Shopify API CARTS - 更改 line_item line_price 以覆盖价格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Shopify 有一个 CARTS api,但它是只读的.我试图找到一种方法来操纵 line_item 的 line_price 或 price 属性.Shopify 支持人员已指示我到这里寻求答案.

Shopify has a CARTS api but it is read-only. I am trying to find a way to manipulate the line_item's line_price or price attribute. Shopify support has directed me here for an answer.

由于没有关于此的适当文档,任何帮助将不胜感激.

Since there is no proper documentation on this any help would be appreciated.

推荐答案

产品有变体,订单项有产品 ID 和变体 ID.订单项也有价格.无论您如何访问该项目(使用 Ajax API 或后端 API),您都无法操纵价格.如果要更改价格,则必须更改产品的变体价格.您使用后端 API 和产品或变体调用执行的操作.

Products have variants, and a line item has a product ID and a variant ID. A line item has a price too. And no matter how you access that item (using the Ajax API or the backend API) you cannot manipulate the price. If you want to change a price, you have to change the product's variants price. That you do with the backend API and the product or variant calls.

这篇关于Shopify API CARTS - 更改 line_item line_price 以覆盖价格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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