Product object represents a product sold in web-store. Can be either product or product variant.
Returns true
if product is available, i.e product status is live, store is active and set up correctly. Returns true
even if product is out of stock.
Returns an array with the products categories. Each item is of category type.
Returns product currency.
Returns an object with the product dimensions. The object has the following attributes:
height
- product height.
Usage example: {{ product.dimensions.height }}
.length
- product length.
Usage example: {{ product.dimensions.length }}
.width
- product width.
Usage example: {{ product.dimensions.width }}
.unit
- unit of measurement.
Usage example: {{ product.dimensions.unit }}
. Default value is m
.display_unit
- preferred unit for display.
Usage example: {{ product.dimensions.display_unit }}
. Default value is cm
.
Returns product ID.
Returns true
when the product has an image. Returns false
otherwise.
Returns Image object of the product image. Image URLs refers to the domain of the media server.
Returns translated product name based on locale.
Returns true
when the product has an image. Returns false
otherwise.
Returns Image object of the product image. Image URLs refers to the current site domain.
Returns true
if the product is out of stock. Returns false
otherwise.
Returns product price before tax.
Returns the lowest price of product variants before tax. If product has no variants, returns the product price.
Returns the highest price of product variants before tax. If product has no variants, returns the product price.
Returns product price after tax.
Returns lowest product variant price after tax. If product has no variants, returns the product price.
Returns highest product variant price after tax. If product has no variants, returns the product price.
Returns the number of reserved products.
Returns the product SKU.
Returns the product slug.
Returns the product status, "draft"
if the product is not live and "live"
when product is live.
Returns the number of products in stock.
Returns the product's tax rate.
Returns true
if the product uses variants. Otherwise returns false
.
Returns the number of variants the product has.
Returns an object with the product weight. The object has the following attributes:
weight
- product weight.
Usage example: {{ product.weight.weight }}
.unit
- unit of weight.
Usage example: {{ product.weight.unit }}
. Default value is kg
.unit
- preferred unit for display.
Usage example: {{ product.weight.display_unit }}
. Default value is kg
.