Interface: ProductGridConfig
Defined in: context/ProductGridContext.tsx:28
Tier 2 grid config context. Collapses the feature-flag/display and callback props that ProductGrid otherwise cascades through ProductCard/ClusterCard down to AddToCart/ItemStock. ProductGrid is the provider; the card subtree consumes via useProductGridConfig() instead of receiving ~20 threaded props.
Prop-name aliases are resolved here to a single canonical name:
- ProductGrid
stockValidation->enableStockValidation(ProductGridaddToCartLabelsstays as-is; ProductCard already maps it to AddToCart'slabelsprop at its existing render site.)
Properties
addToCartComponent?
optionaladdToCartComponent?:ComponentType<AddToCartComponentProps>
Defined in: context/ProductGridContext.tsx:90
Replaces the default add-to-cart control.
addToCartLabels?
optionaladdToCartLabels?:Record<string,string>
Defined in: context/ProductGridContext.tsx:61
Localised label overrides forwarded to each card's AddToCart component.
afterAddToCart?
optionalafterAddToCart?: (cart,item?) =>void
Defined in: context/ProductGridContext.tsx:69
Called after an item is successfully added to the cart.
Parameters
cart
Cart
item?
CartMainItem
Returns
void
allowAddToCart?
optionalallowAddToCart?:boolean
Defined in: context/ProductGridContext.tsx:41
When true, cards render the add-to-cart control.
allowIncrDecr?
optionalallowIncrDecr?:boolean
Defined in: context/ProductGridContext.tsx:47
When true, cards show quantity increment/decrement steppers.
badgesComponent?
optionalbadgesComponent?:ComponentType<BadgesComponentProps>
Defined in: context/ProductGridContext.tsx:94
Replaces the default product / cluster badges block.
bulkPricesComponent?
optionalbulkPricesComponent?:ComponentType<ProductBulkPricesComponentProps>
Defined in: context/ProductGridContext.tsx:100
Replaces the default product-bulk-prices block on a PDP.
bundlesComponent?
optionalbundlesComponent?:ComponentType<ProductBundlesComponentProps>
Defined in: context/ProductGridContext.tsx:98
Replaces the default product-bundles block on a PDP.
cartId?
optionalcartId?:string
Defined in: context/ProductGridContext.tsx:51
Target cart ID that add-to-cart actions operate on.
childItems?
optionalchildItems?:number[]
Defined in: context/ProductGridContext.tsx:53
Child product IDs to add alongside the main product (bundle/cluster children).
clusterCardComponent?
optionalclusterCardComponent?:ComponentType<object&Record<string,unknown>>
Defined in: context/ProductGridContext.tsx:110
Replaces the whole ClusterCard rendered inside ProductGrid / ProductSlider.
columns
columns:
number
Defined in: context/ProductGridContext.tsx:31
Number of columns the grid renders cards in.
createCart?
optionalcreateCart?:boolean
Defined in: context/ProductGridContext.tsx:43
When true, adding an item creates a cart if none exists yet.
enableAddFavorite?
optionalenableAddFavorite?:boolean
Defined in: context/ProductGridContext.tsx:39
When true, cards show the add-to-favorites control.
enableStockValidation?
optionalenableStockValidation?:boolean
Defined in: context/ProductGridContext.tsx:49
When true, add-to-cart validates the requested quantity against stock. Aliased from ProductGrid's stockValidation prop.
favoriteComponent?
optionalfavoriteComponent?:ComponentType<FavoriteComponentProps>
Defined in: context/ProductGridContext.tsx:96
Replaces the default add-to-favorite control.
imageComponent?
optionalimageComponent?:ComponentType<ImageComponentProps>
Defined in: context/ProductGridContext.tsx:92
Replaces the default product / cluster image block.
notes?
optionalnotes?:string
Defined in: context/ProductGridContext.tsx:55
Free-text note attached to items added to the cart.
onCartCreated?
optionalonCartCreated?: (cart) =>void
Defined in: context/ProductGridContext.tsx:67
Called when a new cart is created during an add-to-cart action.
Parameters
cart
Cart
Returns
void
onClusterClick?
optionalonClusterClick?: (cluster) =>void
Defined in: context/ProductGridContext.tsx:79
Called when a cluster card is clicked.
Parameters
cluster
Cluster
Returns
void
onProceedToCheckout?
optionalonProceedToCheckout?: () =>void
Defined in: context/ProductGridContext.tsx:71
Called when the user chooses to proceed to checkout.
Returns
void
onProductClick?
optionalonProductClick?: (product) =>void
Defined in: context/ProductGridContext.tsx:77
Called when a product card is clicked.
Parameters
product
Product
Returns
void
onRequestQuoteClick?
optionalonRequestQuoteClick?: (cart) =>void
Defined in: context/ProductGridContext.tsx:73
Called when the user clicks the request-a-quote action.
Parameters
cart
Cart
Returns
void
onToggleFavorite?
optionalonToggleFavorite?: (item,isFavorite) =>void
Defined in: context/ProductGridContext.tsx:75
Called when a product/cluster favorite is toggled; isFavorite is the new state.
Parameters
item
Product | Cluster
isFavorite
boolean
Returns
void
price?
optionalprice?:number
Defined in: context/ProductGridContext.tsx:57
Explicit unit price override passed to add-to-cart.
priceComponent?
optionalpriceComponent?:ComponentType<PriceComponentProps>
Defined in: context/ProductGridContext.tsx:86
Replaces the default price block in cards / PDP / cart row / order row.
priceLabels?
optionalpriceLabels?:Record<string,string>
Defined in: context/ProductGridContext.tsx:63
Localised label overrides forwarded to the embedded <ProductPrice> display inside each card.
productCardComponent?
optionalproductCardComponent?:ComponentType<object&Record<string,unknown>>
Defined in: context/ProductGridContext.tsx:108
Replaces the whole ProductCard rendered inside ProductGrid / ProductSlider.
showAvailability?
optionalshowAvailability?:boolean
Defined in: context/ProductGridContext.tsx:37
When true, cards display the availability indicator.
showModal?
optionalshowModal?:boolean
Defined in: context/ProductGridContext.tsx:45
When true, the add-to-cart flow opens a confirmation modal.
showPrice?
optionalshowPrice?:boolean
Defined in: context/ProductGridContext.tsx:33
When true, cards display the product price.
showStock?
optionalshowStock?:boolean
Defined in: context/ProductGridContext.tsx:35
When true, cards display the stock level / status.
stockComponent?
optionalstockComponent?:ComponentType<StockComponentProps>
Defined in: context/ProductGridContext.tsx:88
Replaces the default stock / availability block.
stockLabels?
optionalstockLabels?:Record<string,string>
Defined in: context/ProductGridContext.tsx:59
Localised label overrides for stock-status text rendered on cards.
surchargesComponent?
optionalsurchargesComponent?:ComponentType<ProductSurchargesComponentProps>
Defined in: context/ProductGridContext.tsx:102
Replaces the default surcharges block on a PDP / cart row.