Product

From Shopify Wiki

Jump to: navigation, search

The liquid variable _product_ has the following attributes:

Contents

product.id

Returns the id of this product

product.title

Returns the title of this product

product.handle

Returns the handle of this product

product.type

Returns the type of this product, e.g. "snowboard", "headphones"

product.vendor

Returns the vendor of this product, e.g. "Sony", "Apple"

product.price

Returns the price for this product. By default this is the minimum price.

product.price_min

Returns the minimum price for this product


Returns a "compare at" price, e.g. recommended retail price for the least expensive variant of this product


product.price_max

Returns the maximum price for this product

product.compare_at_price_max

Returns a "compare at" price, e.g. recommended retail price for the most expensive variant of this product

product.compare_at_price_varies

Returns true if the compare_at_price_min is different from compare_at_price_max

product.url

Returns the url of this product. You need this for hyperlinking to this product's detail page from anywhere else in the store

<a href="{{product.url}}"><img src="{{ product.featured_image | product_img_url: 'small' }}" /></a>

product.featured_image

Returns the filename with a relative path of the featured image.

product.images

Returns a collection of all image filenames for this product

product.description

Returns the description of this product

product.variants

Returns a collection of all of this product's variants. See variant

product.available

Returns false if all variants' quantities are zero and their policies are set to "stop selling when sold out".

product.collections

Returns a list of collections a product is listed in.

product.tags

Returns a list of the product's tags (represented by simple strings).

Personal tools