Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

ProductQuantity

The ProductQuantity container manages and displays the quantity of a product that a shopper wants to purchase on the product details page.

The container receives initial product data during initialization to preload the component and, being event-driven, updates with data emitted to pdp/data within the event scope.

ProductQuantity configurations

The ProductQuantity container provides the following configuration options:

Option Type Req? Description
onValuefunctionNo Callback function to handle changes in the quantity.
scopestringNo Unique identifier for the PDP context. Only containers rendered with this scope will respond to product events.

Example

The following example demonstrates how to configure the ProductQuantity container:

return productRenderer.render(ProductDetails, {
onValue: (value) => console.log(value),
});