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

Home > @vue-storefront/core > CartGetters

CartGetters interface

Signature:

export interface CartGetters<CART, CART_ITEM> 

Properties

Property Modifiers Type Description
getCoupons (cart: CART) => AgnosticCoupon[]
getDiscounts (cart: CART) => AgnosticDiscount[]
getFormattedPrice (price: number) => string
getItemAttributes (cartItem: CART_ITEM, filters?: Array<string>) => Record<string, AgnosticAttribute | string>
getItemImage (cartItem: CART_ITEM) => string
getItemName (cartItem: CART_ITEM) => string
getItemPrice (cartItem: CART_ITEM) => AgnosticPrice
getItemQty (cartItem: CART_ITEM) => number
getItems (cart: CART) => CART_ITEM[]
getItemSku (cartItem: CART_ITEM) => string
getShippingPrice (cart: CART) => number
getTotalItems (cart: CART) => number
getTotals (cart: CART) => AgnosticTotals