Skip to main content

AddToRegistryProductPageWidget

This widget allows users to add or remove the current product and its variant to or from their gift registry on product pages.

Widget example​

Add to registry widget example

Code​

Liquid
<div
class="gw-gr-add-to-registry-product-page-widget-placeholder"
data-gw-product-id="{{ product.id }}"
data-gw-variant-id="{% if product.selected_or_first_available_variant %}{{ product.selected_or_first_available_variant.id }}{% else %}null{% endif %}"
data-gw-button-class="custom-class-name"
style="display: block"
></div>

Attributes​

Attributes
data-gw-product-idrequired
Specifies the unique identifier for the product to be added or removed from the gift registry.
data-gw-variant-idrequired
Specifies the unique identifier for the product variant to be added or removed from the gift registry.
data-gw-button-class?optional
Specifies the custom class name for the button.