Skip to main content

Interface: CartInitConfig

Defined in: composables/shared/utils/cartInit.ts:31

Configuration object for initCart.

Properties

companyId?

optional companyId?: number

Defined in: composables/shared/utils/cartInit.ts:41

Active company ID — overrides user's default company for cart lookup and creation


imageSearchFilters?

optional imageSearchFilters?: MediaImageProductSearchInput

Defined in: composables/shared/utils/cartInit.ts:45

Image search filters forwarded to cart queries that hydrate item media.


imageVariantFilters?

optional imageVariantFilters?: TransformationsInput

Defined in: composables/shared/utils/cartInit.ts:47

Image transformation filters forwarded to cart queries that hydrate item media.


language?

optional language?: string

Defined in: composables/shared/utils/cartInit.ts:43

Language code for localised cart queries. Defaults to 'NL'.


onCartCreated?

optional onCartCreated?: (cart) => void

Defined in: composables/shared/utils/cartInit.ts:49

Callback invoked with the resolved cart once it is fetched or created.

Parameters

cart

Cart

Returns

void


services

services: Services

Defined in: composables/shared/utils/cartInit.ts:37

The Services bundle — pass services from usePropellerContext() / the provider's value object. Replaces the previous graphqlClient field which forced this util to know how to construct services.


user

user: AnyUser

Defined in: composables/shared/utils/cartInit.ts:39

The current user (Contact or Customer); null for anonymous carts.