Skip to main content

Interface: UseOrdersOptions

Defined in: composables/react/useOrders.ts:47

Options for useOrders.

Properties​

afterReorder?​

optional afterReorder?: (cart) => void

Defined in: composables/react/useOrders.ts:78

Fires after a reorder completes — receives the cart all items were added to.

Parameters​

cart​

Cart

Returns​

void


channelIds?​

optional channelIds?: number[]

Defined in: composables/react/useOrders.ts:74

Restrict orders to specific sales channels.


companyId?​

optional companyId?: number

Defined in: composables/react/useOrders.ts:53

Active company id; scopes orders to a company for B2B users.


configuration?​

optional configuration?: object

Defined in: composables/react/useOrders.ts:69

Portal configuration: image search/variant filters.

imageSearchFiltersGrid?​

optional imageSearchFiltersGrid?: MediaImageProductSearchInput

imageVariantFiltersSmall?​

optional imageVariantFiltersSmall?: TransformationsInput


graphqlClient​

graphqlClient: GraphQLClient

Defined in: composables/react/useOrders.ts:49

GraphQL client the hook derives its Services bundle from.


initialSearchForm?​

optional initialSearchForm?: OrderSearchForm

Defined in: composables/react/useOrders.ts:67

Seed the search/filter form on mount — e.g. rehydrated from the URL query so a bookmarked/shared filtered view restores. The consumer is responsible for the fetch: pass this and the first fetch uses the seeded criteria.


itemsPerPage?​

optional itemsPerPage?: number

Defined in: composables/react/useOrders.ts:57

Page size for the order list. Defaults to 10.


language?​

optional language?: string

Defined in: composables/react/useOrders.ts:55

Language for order/PDF queries. Defaults to 'NL'.


onCartCreated?​

optional onCartCreated?: (cart) => void

Defined in: composables/react/useOrders.ts:76

Fires when reorder creates a fresh cart — use it to persist the cart id.

Parameters​

cart​

Cart

Returns​

void


orderStatuses?​

optional orderStatuses?: string[]

Defined in: composables/react/useOrders.ts:59

Order statuses to include. Defaults to ['NEW','CONFIRMED','VALIDATED','ORDER'].


termFields?​

optional termFields?: OrderSearchFields[]

Defined in: composables/react/useOrders.ts:61

Fields the free-text term is matched against.


user​

user: AnyUser

Defined in: composables/react/useOrders.ts:51

The signed-in user; supplies the userId the order query is scoped to.