Product
Product object represents a product sold in a web store. It can be a product or a product variant.
List of available attributes
- alt_image
- alt_image?
- assets
- available?
- categories
- created_at
- currency
- description
- dimensions
- draft?
- effective_price
- effective_price_gross
- effective_price_max
- effective_price_max_gross
- effective_price_max_net
- effective_price_max_with_tax
- effective_price_min
- effective_price_min_gross
- effective_price_min_net
- effective_price_min_with_tax
- effective_price_net
- effective_price_with_tax
- full_title
- id
- image
- image?
- live?
- name
- og_description
- og_image
- og_image?
- on_sale?
- out_of_stock?
- photos
- price
- price_gross
- price_max
- price_max_gross
- price_max_net
- price_max_with_tax
- price_min
- price_min_gross
- price_min_net
- price_min_with_tax
- price_net
- price_with_tax
- reserved_quantity
- sale_percentage
- sale_price
- sale_price_gross
- sale_price_max
- sale_price_max_gross
- sale_price_max_net
- sale_price_max_with_tax
- sale_price_min
- sale_price_min_gross
- sale_price_min_net
- sale_price_min_with_tax
- sale_price_net
- sale_price_with_tax
- sku
- slug
- status
- stock
- tax_rate
- title
- title_format
- title_format_pattern
- title_separator
- title_separator_value
- updated_at
- url
- uses_variants
- variant_types
- variants_count
- weight
alt_image
Returns the product's alternative image, if available.
alt_image?
Returns true if the product has an alternative image. Returns false otherwise.
assets
Returns an array of the product's assets as Asset objects.
available?
Returns true if the product is live and the store is active and configured correctly. A product can be available even when it is out of stock.
categories
Returns an array of the product's Category objects.
created_at
Returns the date and time when the product was created.
currency
Returns the product currency.
description
Returns the product description translated for the current locale, falling back to the default value when needed.
dimensions
Returns an object containing the product dimensions:
height— product height. Use{{ product.dimensions.height }}.length— product length. Use{{ product.dimensions.length }}.width— product width. Use{{ product.dimensions.width }}.unit— unit of measurement. Use{{ product.dimensions.unit }}.display_unit— preferred unit for display. Use{{ product.dimensions.display_unit }}.
draft?
Returns true if the product is not live. A variant is not live if its parent product is not live.
effective_price
Returns the product's effective price before tax, based on the applicable regular or sale price.
effective_price_net
Alias for effective_price.
effective_price_with_tax
Returns the product's effective price after tax.
effective_price_gross
Alias for effective_price_with_tax.
effective_price_min
Returns the lowest effective price of the product's variants before tax. If the product has no variants, returns its effective price.
effective_price_min_net
Alias for effective_price_min.
effective_price_min_with_tax
Returns the lowest effective price of the product's variants after tax. If the product has no variants, returns its effective price after tax.
effective_price_min_gross
Alias for effective_price_min_with_tax.
effective_price_max
Returns the highest effective price of the product's variants before tax. If the product has no variants, returns its effective price.
effective_price_max_net
Alias for effective_price_max.
effective_price_max_with_tax
Returns the highest effective price of the product's variants after tax. If the product has no variants, returns its effective price after tax.
effective_price_max_gross
Alias for effective_price_max_with_tax.
full_title
Returns the product title formatted according to the applicable title format and separator settings.
id
Returns the product ID.
image
Returns the product's main image, if available.
image?
Returns true if the product has a main image. Returns false otherwise.
live?
Returns true if the product is live. A variant is live only when its parent product is also live.
name
Returns the product name translated for the current locale.
og_description
Returns the Open Graph description translated for the current locale.
og_image
Returns an Image object for the Open Graph image. Falls back to the product image if no Open Graph image is set. Image URLs use the current site domain.
og_image?
Returns true if an Open Graph image is available. Returns false otherwise.
on_sale?
Returns true if a sale price applies to the product. Returns false otherwise.
out_of_stock?
Returns true if the product is out of stock. Returns false otherwise.
photos
Returns an array of the product's image assets as Asset objects.
price
Returns the product price before tax. For products with variants, use price_min and price_max for the price range.
price_net
Alias for price.
price_with_tax
Returns the product price after tax.
price_gross
Alias for price_with_tax.
price_min
Returns the lowest price of the product's variants before tax. If the product has no variants, returns its price.
price_min_net
Alias for price_min.
price_min_with_tax
Returns the lowest price of the product's variants after tax. If the product has no variants, returns its price after tax.
price_min_gross
Alias for price_min_with_tax.
price_max
Returns the highest price of the product's variants before tax. If the product has no variants, returns its price.
price_max_net
Alias for price_max.
price_max_with_tax
Returns the highest price of the product's variants after tax. If the product has no variants, returns its price after tax.
price_max_gross
Alias for price_max_with_tax.
sale_price
Returns the product's sale price before tax, if set.
sale_price_net
Alias for sale_price.
sale_price_with_tax
Returns the product's sale price after tax, if set.
sale_price_gross
Alias for sale_price_with_tax.
sale_price_min
Returns the lowest sale price of the product's variants before tax, if available.
sale_price_min_net
Alias for sale_price_min.
sale_price_min_with_tax
Returns the lowest sale price of the product's variants after tax, if available.
sale_price_min_gross
Alias for sale_price_min_with_tax.
sale_price_max
Returns the highest sale price of the product's variants before tax, if available.
sale_price_max_net
Alias for sale_price_max.
sale_price_max_with_tax
Returns the highest sale price of the product's variants after tax, if available.
sale_price_max_gross
Alias for sale_price_max_with_tax.
sale_percentage
Returns the product's sale percentage. Returns 0 if the product is not on sale, or null if its minimum and maximum prices differ.
reserved_quantity
Returns the number of units reserved for the product.
sku
Returns the product SKU.
slug
Returns the product slug translated for the current locale.
status
Returns the product status, such as draft or live.
stock
Returns the product's stock quantity.
tax_rate
Returns the product's tax rate.
title
Returns the product name.
title_format
Returns the product-specific title format override, if set.
title_format_pattern
Returns the title format pattern used for the product, with fallback to the site or system default.
title_separator
Returns the product-specific title separator override, if set.
title_separator_value
Returns the title separator used for the product, with fallback to the site or system default.
updated_at
Returns the date and time when the product was last updated.
url
Returns the product's canonical URL for the current locale.
uses_variants
Returns true if the product has variants. Returns false otherwise.
variant_types
Returns an array of Product variant type objects used by the product.
variants_count
Returns the number of variants the product has.
weight
Returns an object containing the product weight:
weight— product weight. Use{{ product.weight.weight }}.unit— unit of weight. Use{{ product.weight.unit }}.display_unit— preferred unit for display. Use{{ product.weight.display_unit }}.