updateCurrentCartLineItemQuantity( )


Updates the quantity of one or more line items in the current site visitor's cart.

The updateCurrentCartLineItemQuantity() function returns a Promise that resolves when the quantities of the current cart's line items are updated. This endpoint is only for updating the quantity of line items. To entirely remove a line item from the current cart, use removeLineItemsFromCurrentCart(). To add a new line item to the current cart, use addToCurrentCart().

This endpoint checks the amount of stock remaining for this line item. If the specified quantity is greater than the remaining stock, then the quantity returned in the response is the total amount of remaining stock.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Stores - all permissions
Manage eCommerce - all permissions
Learn more about permission scopes.
Method Declaration
Copy
Method Parameters
lineItemsArray<LineItemQuantityUpdate>Required

Line item IDs and their new quantity.

Returns
Return Type:Promise<UpdateLineItemsQuantityResponse>
Was this helpful?
Yes
No