-
Notifications
You must be signed in to change notification settings - Fork 82
Description
Hey! I'm John from Createur and I'm using updateItem as part of a function to ensure line item properties are attached to all cart items before the checkout.
As a result, all we're trying to do is add or change properties on the item. According to the docs, leaving quantity as undefined would be good for this, and the items would be otherwise unaffected - but I'm finding that quantity is set to 1 for that item instead.
This happens both using line index and ID, and seems to be behaviour straight through from the Shopify cart API, although not explicitly stated.
You can try this out on Sandler:
- Visit the site
CartJS.addItem(39335042547784, 4);CartJS.updateItem(1, undefined);or use the cart API
If others agree, I would suggest changing the CartJS documentation to reflect this.
In terms of a fix, I'm wondering what the best way to go about passing through the existing quantity where none is provided would be?