Home > @shopware-pwa/composables > IUseCart

# IUseCart interface

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

interface for useCart composable

Signature:

export interface IUseCart 

# Properties

Property Type Description
addProduct ({ id, quantity }: { id: string; quantity?: number; }) => void (BETA)
cart Readonly<Ref<Readonly<Cart>>> (BETA)
cartItems Readonly<Ref<Readonly<LineItem[]>>> (BETA)
changeProductQuantity ({ id, quantity, }: { id: string; quantity: number; }) => void (BETA)
count Readonly<Ref<Readonly<number>>> (BETA)
error Readonly<Ref<Readonly<string>>> (BETA)
loading Readonly<Ref<Readonly<boolean>>> (BETA)
refreshCart () => void (BETA)
removeProduct ({ id }: Partial<Product>) => void (BETA)
subtotal Readonly<Ref<Readonly<number>>> (BETA)
totalPrice Readonly<Ref<Readonly<number>>> (BETA)