Zid Docs
Merchant APIApp APIThemes
Merchant APIApp APIThemes
Help Center
Slack
  1. Zid Themes Library: API Integration
  • 🚨 Important Update: Zid Themes
  • Landing Page Development
  • Getting Started with Zid Themes
    • Introduction to Theme Development
    • Manage your Themes
    • Building Themes in Zid
    • Theme File Structure
    • Twig Syntax and Features
    • Zid Theme Packager
  • Templates
    • Layout
    • Home Page
    • Products
    • Cart
    • Store Language and Currency
  • Settings Schema
    • Text
    • Number
    • Text-Area
    • Select
    • Radio Buttons
    • Checkbox
    • Range
    • Color
    • Image
    • Product
    • Category
    • List
    • Fieldset
  • Code Snippets
    • Apple Pay Quick Checkout
    • Custom CSS Injection
    • Displaying the Store's Business Center Logo
    • Customizing Copyright Text
    • Store's Main Navigation Menu
    • Customer Wishlist
    • Products
      • Products Badges
      • Product Ratings
      • Remaining Product Stock
      • Sold Items Count
      • Product Filtration by Attributes
      • Grouped Products
      • Product Questions & Answers
      • Product Restock Notfication
    • SEO
      • Images alt text
      • Themes SEO Marketing Tags
    • Marketing
      • Metafields
      • Gift Feature
      • Loyalty Program
  • Zid Themes Library: API Integration
    • Products
    • Product Categories
    • Cart
    • Blog
    • Customer
    • Store Settings
  • Data Reference
    • Locals
    • Store
    • Cart
    • Product
    • Products List
    • Category
    • Categories List
    • Session
    • FAQs
    • Customer
    • Blogs
    • Page
    • Main Menu
    • Main Navigation Menu
    • Request
    • Orders
    • Addresses
    • Store Payment Methods
    • Store Shipping Methods
    • Store Banks
    • Asset URL
    • Header Meta Tags
    • Loyalty pogram Wallet
  • Themes CLI
    • CLI Authentication
    • Theme Create
    • Theme Package
    • Theme Update
    • Themes List
    • Theme Preview
  1. Zid Themes Library: API Integration

Products

This section details the APIs available for handling products in the Zid Themes Library.

Fetch All Products#

Function: fetchAll
Description: Retrieves a list of products based on specified criteria.
Parameters:
catId: Category ID (pass null for products from all categories).
query: JSON object with the following properties:
page: Pagination page number.
per_page: Number of items per page.
search: Search term for product name or SKU.
on_sale: 0 or 1 to filter sale items.
sort_by: Sorting criteria (display_order, created_at, popularity_order, price).
order: Sort order (asc, desc).
from_price: Minimum price filter.
to_price: Maximum price filter.
Usage: 
zid.store.product.fetchAll(catId, query).then(function (response) { /* Handle response */ });

Fetch Specific Product#

Function: fetch
Description: Retrieves details of a specific product or product variant.
Parameters:
id: Product ID or variant ID.
Usage: 
zid.store.product.fetch(id).then(function (response) { /* Handle response */ });

Get Product Reviews#

Function: getReviews
Description: Fetches reviews for a specified product.
Parameters:
product_id: The main product ID.
page: Pagination page number.
Usage: 
zid.store.product.getReviews(product_id, page).then(function (response) { /* Handle response */ });

Add Product Review#

Function: addReview
Description: Adds a review to a product.
Parameters:
id: Main product ID.
comment: Review comment.
rating: Review rating.
is_anonymous: Boolean to indicate if the review is anonymous.
Usage: 
zid.store.product.addReview(id, comment, rating, is_anonymous).then(function (response) { /* Handle response */ });
Note: The product_id can be passed from an onclick function in your theme's interactive elements.

Get Product Bundle Offer#

Function: getProductBundleOffer
Description: Retrieves bundle offers associated with a product.
Parameters:
id: Main product ID.
Usage: 
zid.store.product.getProductBundleOffer(id).then(function (response) { /* Handle response */ });
Modified at 2024-11-05 12:46:25
Previous
Zid Themes Library: API Integration
Next
Product Categories
Built with