sections object contains rendered HTML of cart (used to populate the cart notification) and includes the HTML of the item that was just added to the cart. However, the key rendered in the HTML is not the same as the key value in the response. This is caused by the Script Editor adding a discount line item: https://www.diffchecker.com/jDihmnE6.
Describe the current behavior
Describe the expected behavior
Cart notification loads and is rendered with correct product information
Version information (Dawn, browsers and operating systems)
Possible solution
Dawn: Better error handling for cart notification
Platform:
cart/add
API response could eliminate a discrepancy in the itemkey
:cart/add
response is JSON object with line items:sections
object contains rendered HTML of cart (used to populate the cart notification) and includes the HTML of the item that was just added to the cart. However, thekey
rendered in the HTML is not the same as thekey
value in the response. This is caused by the Script Editor adding a discount line item: https://www.diffchecker.com/jDihmnE6.Additional context/screenshots
More on how item
key
is generated: https://community.shopify.com/c/shopify-apis-and-sdks/generating-line-item-key-in-app/td-p/497476This behaviour was introduced by https://github.com/Shopify/dawn/pull/1321