Skip to main content

Interface: UseCartOptions

Defined in: composables/react/useCart.ts:27

Options for useCart.

Properties​

cartId?​

optional cartId?: string

Defined in: composables/react/useCart.ts:33

Existing cart id to seed the hook with, skipping resolveCart.


companyId?​

optional companyId?: number

Defined in: composables/react/useCart.ts:35

Active company id for B2B carts and purchase-authorization checks.


configuration?​

optional configuration?: object

Defined in: composables/react/useCart.ts:39

Portal configuration: language plus image search/variant filters.

imageSearchFiltersGrid?​

optional imageSearchFiltersGrid?: MediaImageProductSearchInput

imageVariantFiltersSmall?​

optional imageVariantFiltersSmall?: TransformationsInput

language?​

optional language?: string


graphqlClient​

graphqlClient: GraphQLClient

Defined in: composables/react/useCart.ts:29

GraphQL client the hook derives its Services bundle from.


language?​

optional language?: string

Defined in: composables/react/useCart.ts:37

Cart language. Falls back to configuration.language, then 'NL'.


onCartCreated?​

optional onCartCreated?: (cart) => void

Defined in: composables/react/useCart.ts:41

Fires once whenever a cart is resolved or created — use it to persist cart.cartId.

Parameters​

cart​

Cart

Returns​

void


user​

user: AnyUser

Defined in: composables/react/useCart.ts:31

The signed-in user (Contact or Customer); scopes cart lookup and pricing.