Developers

Product

Product object represents a product sold in web-store. Can be either product or product variant.

List of available attributes

currency

Returns product currency.

id

Returns product ID.

image?

Returns "true" when the product has an image. Returns "false" otherwise.

image

Returns Image object of the product image.

name

Returns translated product name based on locale.

out_of_stock?

Returns "true" if the product is out of stock. Returns "false" otherwise.

price

Returns product price before tax.

price_min

Returns the lowest price of product variants before tax. If product has no variants, returns the product price.

price_max

Returns the highest price of product variants before tax. If product has no variants, returns the product price.

price_with_tax

Returns product price after tax. 

price_min_with_tax

Returns lowest product variant price after tax. If product has no variants, returns the product price.

price_max_with_tax

Returns highest product variant price after tax. If product has no variants, returns the product price.

reserved_quantity

Returns the number of reserved products.

sku

Returns the product SKU.

status

Returns the product status, "draft" if the product is not live and "live" when product is live.

stock

Returns the number of products in stock.

tax_rate

Returns the product's tax rate.

uses_variants

Returns "true" if the product uses variants. Otherwise returns "false".

variants_count

Returns the number of variants the product has.