updateCurrentCart( )


Updates the current site visitor's cart.

The updateCurrentCart() function returns a Promise that resolves when the current 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
Learn more about app permissions.
Method Declaration
Copy
function updateCurrentCart(options: UpdateCurrentCartOptions): Promise<Cart>;
Method Parameters
optionsUpdateCurrentCartOptions

Current cart update options.

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

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

Did this help?