Zid Themes Docs
  • Getting started
  • Twig reference
  • Theme file structure
  • zid-theme package
  • Theme Templates and Data
    • layout.twig
  • Store language and currency
  • Home template modules
  • Product template
  • Cart template
  • Settings Schema
    • text
    • number
    • textarea
    • select
    • radios
    • checkbox
    • checkboxes
    • range
    • color
    • image
    • product
    • category
    • category products
    • list
    • fieldset
  • Data reference
    • locals
    • store
    • cart
    • product
    • products list
    • category
    • categories list
    • session
    • customer
    • faqs
    • blogs
    • blog
    • page
    • main menu
    • request
    • orders
    • addresses
    • store payment methods
    • store shipping methods
    • store banks
    • asset_url
    • header_meta_tags
  • Zid-api Library
    • Product
    • Category
    • Cart
    • Blog
    • Customer
    • Settings
  • Upload themes and more
Powered by GitBook
On this page

Was this helpful?

  1. Zid-api Library

Product

fetchAll function:

parameters:

catId category id

query

return: promise

zid.store.product.fetchAll(catId, query).then(function (response) {
		
})

fetch function:

parameters:

id product id or variant id

return: promise

zid.store.product.fetch(id).then(function (response) {
	
})

getReviews function:

parameters:

product_id: main product id , don't use product.selected_product.id

page

return: promise

zid.store.product.getReviews(product_id, page).then(function (response) {
	
})

addReview function:

parameters:

id : main product id , don't use product.selected_product.id

comment

rating

is_anonymous

return: promise

zid.store.cart.addProduct(id, comment, rating, is_anonymous).then(function (response) {
	
})

// product_id can be passed from onclick function
PreviousZid-api LibraryNextCategory

Last updated 3 years ago

Was this helpful?