Skip to content

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

ProductGiftCardOptions

The ProductGiftCardOptions container manages and displays gift card-specific options on the product details page.

The container receives initial product data during initialization to preload the component. Once loaded, it operates in an event-driven manner, updating with data emitted to pdp/data within the event scope. Additionally, it listens to pdp/values to keep its displayed state in sync with the currently selected configuration. As shoppers interact with the gift card fields, the container updates the global PDP configuration values and validity.

Container rendering

ProductGiftCardOptions container

ProductGiftCardOptions container

ProductGiftCardOptions configurations

The ProductGiftCardOptions container provides the following configuration options:

Option Type Req? Description
scopestringNo Unique identifier for the PDP context. Only containers rendered with this scope will respond to product events.
classNamestringNo Additional CSS class applied to the container wrapper.

Example

The following example demonstrates how to configure and render the ProductGiftCardOptions container:

return productRenderer.render(ProductGiftCardOptions, {
scope: 'modal', // optional
className: 'pdp-gift-card-options--custom',
});