updateCart( )


Updates a specified cart's properties.

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

Note: When updating catalog items, options.lineItems.catalogReference is required.

Permissions
Manage eCommerce - all permissions
Manage Stores - all permissions
Manage Restaurants - all permissions
Manage eCommerce - Admin Permissions
Learn more about app permissions.
Method Declaration
Copy
function updateCart(_id: string, options: UpdateCartOptions): Promise<Cart>;
Method Parameters
_idstringRequired

ID of the cart to be updated.


optionsUpdateCartOptions

Available options to use when updating a cart.

Returns
Return Type:Promise<Cart>
JavaScript
import { cart } from "@wix/ecom"; async function updateCart(id, options) { const response = await cart.updateCart(id, options); }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?