Home > @vsf-enterprise/sapcc > UseCartComposable

UseCartComposable interface

Composable method allowing to fetch and manage carts


export interface UseCartComposable 


Property Type Description
cart ComputedProperty<Cart> A cart object
clear () => Promise<void> A method for deleting an existing cart.
clone (props?: CloneCartProps) => Promise<Cart> A method for cloning a saved cart.
error ComputedProperty<UseCartError> An indicator of useCart composable methods errors
load (props?: LoadCartProps) => Promise<void> A method for loading a cart
loading ComputedProperty<UseCartLoading> An indicator of useCart composable methods progress
restore (props?: BaseProps) => Promise<void> A method for restoring a saved cart and marking it as active.
save (props?: SaveCartProps) => Promise<void> A method for saving a cart.
set (newCart: Cart | null) => void A method for setting the cart property manually.