Zid Docs
AppsThemes
Payments
AppsThemes
Payments
Help Center
Slack
  1. JS Integration
  • Getting Started
    • Introduction
    • Theme Development
    • Vitrin Changelog
    • Creating and Managing Theme Presets
    • Legacy Theme Migration
      • Store Settings Mapping
      • Moving to Vitrin Using LLMs
      • Twig to Jinja
      • Breaking Changes
  • 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
    • 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
    • Customer Wallet & Cashback
    • Add Preorder Support to Your Theme
  • Mobile Apps
    • Scripts
  • 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
    • 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. JS Integration

Products

This page documents the new Vitrin product functions and explains the arguments needed to use them (with the matching old Zid call where relevant).
All functions are available via window.zid.products.

Get Product#

New: zid.products.get(product_id)
Old: zid.store.product.fetch(id)
Description: Retrieve the product by id

Get Product Options#

New: zid.products.getProductOptions(product_id, params?)

Arguments#

product_id (string, required) — Product identifier.
params (object, optional):
attributes (object) — Map of attribute_id → attribute_value_id (UUIDs).
option_fields (object) — Map of option_group_id → array of selected option_ids (UUIDs).
input_fields (string[]) — Array of input_field_ids (UUIDs) that currently have values.
Response returns an updated ProductObject (resolved variant, price, stock) based on your selections.

Example params (placeholders)#

IDs come from the product object (all are UUIDs).

Reviews (Read)#

New: zid.products.reviews(product_id, { page?, page_size? })
Old: zid.store.product.getReviews(id, page)

Arguments#

product_id (string, required)
params (object, optional):
page? (number)
page_size? (number)

Reviews (Create)#

New: zid.products.createReview(product_id, payload)
Old: zid.store.product.addReview(id, reviewForm, rating, is_anonymous)

Arguments#

product_id (string, required)
payload (object, required):
rating (number, required) — 1..5
comment? (string)
is_anonymous? (boolean)
order_id? (string)
images? (File[])

Customer Reviews (Mine)#

New: zid.products.getCustomerReviews({ product_id })
Old: zid.store.product.getCustomerReviews(id, orderId)

Arguments#

params (object, required):
product_id (string, required)
Change: orderId is not used in the new API.

Questions (List)#

New: zid.products.questions(product_id, params?)
Description: Retrieve all questions asked about a product.

Parameters#

product_id (string, required) — Product identifier.
params (object, optional) — Optional query parameters:
page (number) — Page number for pagination.
page_size (number) — Number of questions per page.
Usage

Questions (Create)#

New: zid.products.createQuestion(product_id, payload)
Old (used): zid.store.product.addQuestion(id, question, name, email, is_anonymous)

Arguments#

product_id (string, required)
payload (object, required):
name (string, required)
email (string, required)
question (string, required)
is_anonymous? (boolean)

Bundle Offer (List)#

New: zid.products.bundleOffers(params?)
Old (used): zid.store.product.getProductBundleOffer(id)

Arguments#

params (object, optional):
product_ids (array, optional)

Example params (placeholders)#


Stock Alerts#

New: zid.products.stockAlerts({ product_id }, payload)
Description: Subscribe to stock alerts for a product. Customers will be notified when the product is back in stock.

Parameters#

product_id (string, required) — Product identifier.
payload (object, required) — Subscription details containing customer information.

Payload Structure#

customer_email (string, required) — Customer's email address for notifications.
customer_phone_number (string, optional) — Customer's phone number.
customer_name (string, optional) — Customer's name.
Usage

Get Bundle Offer (Single Product)#

New: zid.products.getBundleOffer(product_id)
Description: Get bundle offers specifically for a single product.

Parameters#

product_id (string, required) — Product identifier.
Usage

Notes#

Keep calls minimal: pass only the arguments you need.
All IDs (attributes, option_fields, input_fields) are UUIDs from the product object. They are provided dynamically, you don’t hardcode them.
Modified at 2026-02-17 07:02:10
Previous
Cart
Next
Categories
Built with