Problem with Cart API When Using Function APIs #482
Replies: 1 comment
-
Here's a structured approach to potentially resolve or further diagnose the problem: Initial Diagnosis
Steps to Troubleshoot
If all else fails, reach out to Shopify Developer Support. Also, if you are experiencing continuous problems with Shopify API, I recommend trying the API2Cart solution. It provides a unified API for integration with Shopify and other platforms. |
Beta Was this translation helpful? Give feedback.
-
Hello,
I am encountering an issue with the Cart API when a discount is applied via the Product Discount API to the cart. It appears that, as soon as a discount is active, some functionalities of the API, specifically those related to change.js for modifying the cart based on the line key, no longer work correctly.
Reproduction Scenario:
Add an item to the cart via the Cart API.
Apply a discount to the cart via Shopify Function.
Attempt to modify this item using its line key via change.js.
Expected Behavior:
The cart should allow the item to be modified despite the application of the discount.
Observed Behavior:
Once the discount is applied, attempts to modify the item in the cart using its line key via change.js fail with a 400 error. However, using the line index can patch the problem.
Beta Was this translation helpful? Give feedback.
All reactions