updateLineItemQuantity( )


Deprecated. This function will continue to work, but a newer version is available at wix-ecom-backend.currentCart.updateCurrentCartLineItemQuantity().

Migration Instructions

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:

  1. Add the new import statement:

    Copy
  2. 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.

Method Declaration
Copy
Method Parameters
cartLineItemIdnumberRequired

ID of the cart line item to update.


quantitynumberRequired

Line item's new quantity.

Returns
Return Type:Promise<CartObj>
Did this help?