Skip to main content

Interface: UseCartOptions

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

Options for useCart.

Properties

cartId?

optional cartId?: string

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

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


companyId?

optional companyId?: number

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

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


configuration?

optional configuration?: object

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

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:14

GraphQL client the hook derives its Services bundle from.


language?

optional language?: string

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

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


onCartCreated?

optional onCartCreated?: (cart) => void

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

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:16

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