Home > @vue-storefront/core > UseCartFactoryParams
UseCartFactoryParams interface
Signature:
export interface UseCartFactoryParams<CART, CART_ITEM, PRODUCT, API extends PlatformApi = any> extends FactoryParams<API>
Extends: FactoryParams
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| addItem | (context: Context, params: { currentCart: CART; product: PRODUCT; quantity: any; customQuery?: CustomQuery; }) => Promise<CART> | ||
| applyCoupon | (context: Context, params: { currentCart: CART; couponCode: string; customQuery?: CustomQuery; }) => Promise<{ updatedCart: CART; }> | ||
| clear | (context: Context, params: { currentCart: CART; }) => Promise<CART> | ||
| isInCart | (context: Context, params: { currentCart: CART; product: PRODUCT; }) => boolean | ||
| load | (context: Context, params: { customQuery?: any; }) => Promise<CART> | ||
| removeCoupon | (context: Context, params: { currentCart: CART; couponCode: string; customQuery?: CustomQuery; }) => Promise<{ updatedCart: CART; }> | ||
| removeItem | (context: Context, params: { currentCart: CART; product: CART_ITEM; customQuery?: CustomQuery; }) => Promise<CART> | ||
| updateItemQty | (context: Context, params: { currentCart: CART; product: CART_ITEM; quantity: number; customQuery?: CustomQuery; }) => Promise<CART> |