Interface: AddToCartProps
Defined in: components/AddToCart.tsx:30
Properties
afterAddToCart?
optionalafterAddToCart?: (cart,item?) =>void
Defined in: components/AddToCart.tsx:107
Callback triggered after adding the product to cart.
Parameters
cart
Cart
item?
CartMainItem
Returns
void
allowIncrDecr?
optionalallowIncrDecr?:boolean
Defined in: components/AddToCart.tsx:120
Renders − and + buttons beside the quantity input. Defaults to true.
beforeAddToCart?
optionalbeforeAddToCart?: () =>boolean
Defined in: components/AddToCart.tsx:53
Called before adding to cart. Return false to abort (e.g. failed validation).
Returns
boolean
cartId?
optionalcartId?:string
Defined in: components/AddToCart.tsx:44
Cart ID — required when onAddToCart is not provided
childItems?
optionalchildItems?:number[]
Defined in: components/AddToCart.tsx:50
IDs of the cluster child items, e.g. cluster options
className?
optionalclassName?:string
Defined in: components/AddToCart.tsx:132
Additional CSS class for the root element
cluster?
optionalcluster?:Cluster
Defined in: components/AddToCart.tsx:47
The cluster to be added to cart
companyId?
optionalcompanyId?:number
Defined in: components/AddToCart.tsx:149
Active company ID from the company switcher. Overrides user's default company for cart creation and lookup.
configuration?
optionalconfiguration?:object
Defined in: components/AddToCart.tsx:141
Configuration object passed to the component
imageSearchFiltersGrid?
optionalimageSearchFiltersGrid?:MediaImageProductSearchInput
imageVariantFiltersSmall?
optionalimageVariantFiltersSmall?:TransformationsInput
language?
optionallanguage?:string
urls?
optionalurls?:object
urls.getProductUrl
getProductUrl: (
product,language?) =>string
Parameters
product
Product
language?
string
Returns
string
createCart?
optionalcreateCart?:boolean
Defined in: components/AddToCart.tsx:82
If true a new cart is created if no cart ID is provided. Defaults to false.
currency?
optionalcurrency?:string
Defined in: components/AddToCart.tsx:38
Currency symbol used by the formatPrice helper for the success modal. Resolved from PropellerProvider when omitted; final fallback '€'.
display?
optionaldisplay?:AddToCartDisplay
Defined in: components/AddToCart.tsx:181
Display toggles. Equivalent flat props: allowIncrDecr, showModal,
enableStockValidation.
enableStockValidation?
optionalenableStockValidation?:boolean
Defined in: components/AddToCart.tsx:126
Validates available stock via InventoryService before adding. Defaults to false.
events?
optionalevents?:AddToCartEvents
Defined in: components/AddToCart.tsx:188
Event callbacks. Equivalent flat props: beforeAddToCart, onAddToCart,
afterAddToCart, onCartCreated, onProceedToCheckout,
onRequestQuoteClick.
graphqlClient?
optionalgraphqlClient?:GraphQLClient
Defined in: components/AddToCart.tsx:32
GraphQL client for the Propeller SDK. Resolved from PropellerProvider when omitted.
includeTax?
optionalincludeTax?:boolean
Defined in: components/AddToCart.tsx:156
When true, tax-inclusive price (net) is shown. When false, tax-exclusive price (gross) is shown. Defaults to false.
labels?
optionallabels?:Record<string,string>
Defined in: components/AddToCart.tsx:76
Label overrides for UI strings
available labels:
- outOfStock
- noCartId
- errorAdding
- addedToCart
- modalTitle
- quantity
- continueShopping
- proceedToCheckout
- requestQuoteButton
- add
- adding
language?
optionallanguage?:string
Defined in: components/AddToCart.tsx:129
Language code passed to CartService operations. Defaults to 'en'.
notes?
optionalnotes?:string
Defined in: components/AddToCart.tsx:56
Notes for the cart item
onAddToCart?
optionalonAddToCart?: (product,clusterId?,quantity?,childItems?,notes?,price?,showModal?) =>Cart
Defined in: components/AddToCart.tsx:94
Callback to handle adding the product to cart. If not provided the component calls CartService.addItemToCart internally.
Parameters
product
Product
clusterId?
number
quantity?
number
childItems?
CartChildItemInput[]
notes?
string
price?
number
showModal?
boolean
Returns
Cart
onCartCreated?
optionalonCartCreated?: (cart) =>void
Defined in: components/AddToCart.tsx:88
Callback to handle a new cart being created. WARNING: If not provided the component create new carts on every add-to-cart.
Parameters
cart
Cart
Returns
void
onProceedToCheckout?
optionalonProceedToCheckout?: () =>void
Defined in: components/AddToCart.tsx:135
Callback fired when the "Proceed to checkout" modal button is clicked
Returns
void
onRequestQuoteClick?
optionalonRequestQuoteClick?: (cart) =>void
Defined in: components/AddToCart.tsx:138
Callback fired when the "Request a Quote" modal button is clicked
Parameters
cart
Cart
Returns
void
price?
optionalprice?:number
Defined in: components/AddToCart.tsx:59
Custom price for the product (overrides calculated price)
priceComponent?
optionalpriceComponent?:ComponentType<PriceComponentProps>
Defined in: components/AddToCart.tsx:162
product
product:
Product
Defined in: components/AddToCart.tsx:41
The product to be added to cart
showModal?
optionalshowModal?:boolean
Defined in: components/AddToCart.tsx:114
When true a modal popup is shown after a successful add-to-cart with buttons to continue shopping or proceed to checkout. Defaults to false (only a brief inline success message is shown).
stockComponent?
optionalstockComponent?:ComponentType<StockComponentProps>
Defined in: components/AddToCart.tsx:169
Reserved slot. The success modal does not currently render stock — out-of-stock paths surface via a brief toast instead. Declared so consumers can pass it through uniformly; consumed if/when the modal gains a stock block in the future.
user?
optionaluser?:Contact|Customer|null
Defined in: components/AddToCart.tsx:35
The authenticated user (Contact or Customer). Resolved from PropellerProvider when omitted.