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; }) => Promise<Cart> | (BETA) | 
| addPromotionCode | (promotionCode: string) => Promise<void> | (BETA) | 
| appliedPromotionCodes | ComputedRef<LineItem[]> | (BETA) | 
| cart | ComputedRef<Cart | null> | (BETA) | 
| cartErrors | ComputedRef<EntityError[]> | (BETA) | 
| cartItems | ComputedRef<LineItem[]> | (BETA) | 
| changeProductQuantity | ({ id, quantity, }: { id: string; quantity: number; }) => void | (BETA) | 
| count | ComputedRef<number> | (BETA) | 
| error | ComputedRef<string> | (BETA) | 
| loading | ComputedRef<boolean> | (BETA) | 
| refreshCart | () => void | (BETA) | 
| removeItem | ({ id }: LineItem) => Promise<void> | (BETA) | 
| shippingTotal | ComputedRef<number> | (BETA) | 
| subtotal | ComputedRef<number> | (BETA) | 
| totalPrice | ComputedRef<number> | (BETA) | 
# Methods
| Method | Description | 
|---|---|
| broadcastUpcomingErrors(cart) | (BETA) | 
| getProductItemsSeoUrlsData() | (BETA) |