Zid Docs
AppsThemes
Payments
AppsThemes
Payments
Help Center
Slack
  1. Features
  • Getting Started
    • Introduction
    • Theme Development
    • Vitrin Changelog
    • Creating and Managing Theme Presets
    • Legacy Theme Migration
      • Moving to Vitrin Using LLMs
      • Twig to Jinja
      • Breaking Changes
      • Store Settings Mapping
  • Key Concepts
    • Architecture
    • Templates
      • Overview
      • Overridable Templates
      • Legacy Templates
      • Template Replacements
      • Templates Library
        • home.jinja
        • product.jinja
        • cart.jinja
        • category.jinja
        • products.jinja
        • categories.jinja
        • page.jinja
        • blogs.jinja
        • blog.jinja
        • faqs.jinja
        • reviews.jinja
        • questions.jinja
        • shipping_payment.jinja
        • 404_not_found.jinja
        • brands.jinja
        • brand.jinja
    • Settings
      • Schema files
      • Input Settings
      • Media Settings
      • Form Controls Settings
      • Products Settings
      • Additional Settings
      • Conditional Visibility
      • Migrating twig settings schema
    • Localization
      • localization (jinja v. twig)
    • Theme Editor
      • Overview
  • Building with Vitrin
    • Jinja Basics
    • Vitrin's Jinja Extensions
  • Vitrin CLI
    • Introduction
    • CLI Commands
  • Tips & Tricks
    • Performance
  • JS Integration
    • Supporting both Vitrin and Legacy themes
    • Responses & Errors
    • Cart
    • Products
    • Categories
    • Store
    • Account
    • Blogs
    • Options
    • Events
  • Features
    • SDK Popups – Integration Guidelines
    • Custom Styles Guide
    • Gift Card as a Popup
    • Addresses as a Popup
    • Login as a Popup
    • Checkout as a Popup
    • Apple Pay Quick Checkout
    • Region & Language Popup
    • Dynamic Bundle Products
    • Progressive Discounts
    • Bank Discounts
    • Customer Wallet & Cashback
    • Add Preorder Support to Your Theme
    • Display Product Options as Colors or Images
    • Coupon Form Visibility
    • New Gifting Experience
  • Mobile Apps
    • Scripts
    • Login & Checkout via Page Views
    • Theme Sections Settings
  • API's
    • Authentication
      • Logout
      • Login Status
      • SMS Login
      • Verify SMS Login
      • WhatsApp Login
      • Verify WhatsApp Login
      • Email Login
      • Verify Email Login
      • Register
      • Register Guest
    • Products
      • List Products
      • Search Products
      • Calculate Product Options Price
      • Notify Product Stock Availability
      • Fetch Bundle Offers
      • Fetch Bundle Offers for a Product
      • List My Product Reviews
      • List Product Reviews
      • Create Product Review
      • Update Product Review
      • Delete Product Review
      • List Product Questions
      • Create Product Question
      • Get Product by Slug
      • Get Selection Groups
    • Categories
      • List Categories
    • Checkout
      • Get Cart
      • Remove Cart
      • Duplicate Cart
      • Add Cart Item
      • Empty Cart
      • Update Cart Item
      • Remove Cart Item
      • Upload Cart Input Field
      • Add Gift Card
      • Remove Gift Card
      • Apply Coupon
      • Remove Coupon From Cart
      • Check Coupon Validity
      • Apply Loyalty Points
      • Remove Loyalty Points
      • Preview Rewarded Points
      • List Redemption Methods for Cart
      • Customer’s Loyalty Wallet
      • Customer’s Current Points Balance
      • List Bank Discounts
    • Account
      • Get Profile
      • Delete Account
      • Update Customer Profile
      • Get Addresses
      • Create an Address
      • Get an Address by ID
      • Update an Existing Address
      • Delete Address
      • Get Orders
      • Get Shareable Wishlist Link
      • Get Wishlist
      • Add Products to Wishlist
      • Remove Product from Wishlist
      • Get Address Form Schema
      • Check Product Purchase Status
    • Storefront
      • Store Scripts
      • Pages
      • Blogs
    • Countries
      • Get Countries
      • Get Cities By Country
  1. Features

New Gifting Experience

The Gifting Experience allows customers to add gifting options and personalized gift details to their order.
The gifting experience itself is fully managed by Zid. Theme developers only need to integrate the provided dialog and add an entry point to open it.

Integration Requirements#

1. Check Feature Availability and Include the Template#

Before using the gifting experience, make sure it is enabled in the store settings.
If the feature is enabled, include the gifting template in your cart page:
{% if safeget(store, "settings.checkout.gift_order_settings.is_gift_order_enabled", False) == '1' %}
  {% include 'vitrin:cart/gift-card.jinja' %}
{% endif %}
The template renders the Zid-managed gifting dialog. No additional implementation inside the dialog is required.
Merchants can enable or disable gifting from:
Dashboard → Settings → Gifting
URL pattern:
https://dashboard.zid.sa/en-sa/stores/<store_id>/settings/gifting

2. Add a Gifting Entry Point#

Add an entry point in the cart page that customers can use to open the gifting dialog.
Example:
To open the dialog programmatically:
You can also close it manually if needed:
The dialog automatically closes after a successful submission.

3. Listen for Gift Submission#

When the gifting form is successfully submitted, Zid triggers the following custom event:
event.detail.data returns the updated cart object.
You do not need to refetch the cart after submission.
Use the returned cart data to update your cart UI.

4. Display Gift Details in the Cart#

You can use the gift_card_details object from the cart data to display the current gift information.
Example:
You can use this data to display a gift summary, banner, or other cart UI if needed.

Custom Styling#

The gifting dialog uses Zid's native experience and styling.
If your theme requires supported style adjustments, you can target the gifting dialog using the following component key in the Zid Custom Styles system:
gift_dialog
For implementation details, see the Custom Styles Guide for Theme Developers.

Summary#

ActionDescription
Check availabilitysafeget(store, "settings.checkout.gift_order_settings.is_gift_order_enabled", False) must return '1'
Include template{% include 'vitrin:cart/gift-card.jinja' %}
Open dialogwindow.gift_dialog.open()
Close dialogwindow.gift_dialog.close()
Listen for submissionvitrin:gift:submitted
Updated cartAvailable in event.detail.data
Gift detailsAvailable in cart.gift_card_details
Custom styles keygift_dialog
The gifting experience itself is managed by Zid. Themes should integrate the provided component rather than recreate the gifting flow.
Modified at 2026-09-28 09:15:23
Previous
Coupon Form Visibility
Next
Scripts
Built with