updateCart( )


Updates a specified cart's properties.

The updateCart() function returns a Promise that resolves when the specified cart's properties are updated.

Notes:

  • When updating catalog items, the lineItems.catalogReference.appId and lineItems.catalogReference.catalogItemId fields are required.
  • After a cart is updated, call Refresh Cart to update the cart's UI elements and trigger the Cart Updated event.
Authentication

This function requires elevated permissions and runs only on the backend and on dashboard pages.

Permissions
Manage eCommerce - all permissions
Manage eCommerce - Admin Permissions
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
_idstringRequired

ID of the cart to be updated.


optionsUpdateCartOptions

Available options to use when updating a cart.

Returns
Return Type:Promise<Cart>
Errors
428Failed Precondition

There is 1 error with this status code.

This method may also return standard errors. Learn more about standard Wix errors.

Did this help?