Skip to main content

Type Alias: AddItemToCart()

AddItemToCart: (cartItem) => Promise<void>

Adds an item to the specified cart.

Parameters

cartItem: CartItemWithPriceSettings

The CartItem object containing details of the item to be added to the cart.

Returns

Promise<void>

A promise that resolves when the item has been successfully added to the cart.

Throws

Error Will throw an error if cartItem is missing.

Example usage:

const newItem: CartItem = { ... };
await window.mimeeqApp.actions.addItemToCart(newItem);
console.log('Item added to cart');