You are reading the documentation for Vue Storefront v2. See the latest docs.

Home > @vue-storefront/core > UseCart

UseCart interface

Signature:

export interface UseCart<CART, CART_ITEM, PRODUCT, API extends PlatformApi = any> extends Composable<API> 

Extends: Composable

Properties

Property Modifiers Type Description
cart ComputedProperty<CART>
error ComputedProperty<UseCartErrors>
isInCart (params: { product: PRODUCT; customQuery?: CustomQuery; [k: string]: unknown; }) => boolean
loading ComputedProperty<boolean>

Methods

Method Description
addItem(params)
applyCoupon(params)
clear()
load()
load(params)
removeCoupon(params)
removeItem(params)
setCart(cart)
updateItemQty(params)