Shopify API CARTS

编程入门 行业动态 更新时间:2024-10-22 05:18:02
本文介绍了Shopify API CARTS - 更改 line_item line_price 以覆盖价格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

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屋!

更多推荐

[db:关键词]

本文发布于:2023-04-18 07:09:09,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/932750.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Shopify   API   CARTS

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!