product
The product
object contains following attributes:
Object Fields
Field | Data Type | Description |
---|---|---|
product.id | String | Returns the id of the product. |
product.sku | String | Returns the sku of the product. Remarks: Use the one in variations when variations available. |
product.title | String | Returns the title of the product. |
product.description | String | Returns the description of the product. |
product.media | Array | Return the media information of the product. |
product.content | String | Returns the description of the product. Alias for product.description. |
product.image | String | Return the first product image. |
product.url | String | Returns the relative URL of the product. |
product.price | Number | Returns the price of the product. |
product.hide_price | Boolean | Return true if “hide_price” of the product is enabled. |
product.price_varies | Boolean | Returns true if the product's variants have varying prices. Returns false if all of the product's variants have the same price. |
product.price_min | Number | Returns the lowest price of the product. |
product.lowest_price | Number | Returns the lowest price of the product. Alias for product.price_min . |
product.on_sale | Boolean | Return true if the product sale price is defined. |
product.sale_price | Number | Return the product sale price. |
product.variants | Array | Returns an array of the product's variants. |
product.ga_click_tag | String | Return attributes for Google Analytic click tracking |
product.available | Boolean | Returns true if a product is available for purchase. Returns false if all of the products variants' inventory quantity values are zero or less, and they are not set to "unlimited quantity" |
product.additional_images | Array | Returns an array of additional images of this product |
Code Example
{% for image in product.additional_images %}
<img src="{{ image.src }}">
<img src="{{ product.media.images.thumb.url }}">
{% endfor %}
<a href="{{ product.url }}" {{ product.ga_click_tag }}>
Updated about 1 year ago