Skip to main content

Interface: CartInitConfig

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

Configuration object for initCart.

Properties​

companyId?​

optional companyId?: number

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

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


imageSearchFilters?​

optional imageSearchFilters?: MediaImageProductSearchInput

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

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


imageVariantFilters?​

optional imageVariantFilters?: TransformationsInput

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

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


language?​

optional language?: string

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

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


onCartCreated?​

optional onCartCreated?: (cart) => void

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

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

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

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