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 and, being event-driven, updates with data emitted to pdp/data
within the event scope. It also listens to pdp/values
to keep its displayed state in sync with the currently selected configuration, and it updates the global PDP configuration values and validity as shoppers interact with the gift card fields.
Container rendering
ProductGiftCardOptions container
ProductGiftCardOptions configurations
The ProductGiftCardOptions
container provides the following configuration options:
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',});
Behavior in context
- The container will read the product’s
ac_giftcard
attribute to determine which gift card fields to render. - As the shopper fills out gift card fields, selections are synchronized to the PDP values store (
enteredOptions
) and overall configuration validity is updated accordingly. - If the product does not include
ac_giftcard
, the container renders nothing.