Themes built on the Twig templating engine are now deprecated and require migration to Vitrin to ensure continued support and compatibility with Zid.
{% if safeget(store, "settings.checkout.gift_order_settings.is_gift_order_enabled", False) == '1' %}
{% include 'vitrin:cart/gift-card.jinja' %}
{% endif %}https://dashboard.zid.sa/en-sa/stores/<store_id>/settings/gifting{% include 'vitrin:cart/gift-card.jinja' %}You can also close the dialog manually if needed using: The dialog automatically closes after successful submission.
event.detail.data returns the updated cart object.gift_card_details object from the cart data to display the current gift information:window.zidCustomStyles object. The SDK will automatically apply these styles to the corresponding components, ensuring proper scoping and isolation.gift_dialogwindow.zidCustomStyles object to apply any style overrides specific to the gift feature.| Action | Description |
|---|---|
| Check flag | safeget(store, "settings.checkout.gift_order_settings.is_gift_order_enabled", False) must return '1' |
| Include template | {% include 'vitrin:cart/gift-card.jinja' %} in cart page |
| Open dialog | window.gift_dialog.open() |
| Close dialog | window.gift_dialog.close() (optional) |
| Listen for event | vitrin:gift:submitted → returns updated cart |
| Gift details | Available in cart.gift_card_details |
safeget(store, "settings.checkout.gift_order_settings.is_gift_order_enabled", False) returns '1' before including the template.https://dashboard.zid.sa/en-sa/stores/<store_id>/settings/giftingvitrin:cart/gift-card.jinja in your theme’s cart page to enable the feature.window.gift_dialog.open() and window.gift_dialog.close() to control the dialog.vitrin:gift:submitted event to update your cart dynamically without refetching.cart.gift_card_details to display existing gift details in the cart.