Deprecated.
This function will continue to work, but a newer version is available at
wix-ecom-backend.currentCart.updateCurrentCartLineItemQuantity()
.
If this function is already in your code, it will continue to work.
To stay compatible with future changes, migrate to
wix-ecom-backend.currentCart.updateCurrentCartLineItemQuantity()
.
To migrate to the new function:
Add the new import statement:
Look for any code that uses cart.updateLineItemQuantity()
,
and replace it with currentCart.updateCurrentCartLineItemQuantity()
.
Update your code to work with the new currentCart.updateCurrentCartLineItemQuantity()
call and response properties.
Updates the quantity of a specified line item in the cart.
The updateLineItemQuantity()
function returns a Promise that resolves to the current
site visitor's cart when the specified line item's quantity has been updated.
Note: When editing a site as a contributor, updateLineItemQuantity()
will only work when viewing the live site.
ID of the cart line item to update.
Line item's new quantity.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.