# Product object

# product.available

Returns true if the product is available for sale. Returns false if the product is out of stock and inventory policy has been set to deny.

# product.collections

Returns an array of all of the collections that a product belongs to, except any collections that are not available on the sales channel being used.

Example input

<h3>This product can be found in the following categories</h3>

{% for collection in product.collections %}
    {{ collection.title }}
{% endfor %}

Example output

<h3>This product can be found in the following categories</h3>

Summer
Winter
Sale

# product.compare_at_price

Returns the price of the product for comparing purposes.

# product.compare_at_price_max

Returns the highest compare at price within all variants.

# product.compare_at_price_min

Returns the minimum compare at price within all variants.

# product.compare_at_price_varies

Returns true if the highest compare at price within all variants is different than the minimum. Returns false if values are identical.

# product.content

(Alias of product.description) Returns the description of the product.

# product.created_at

Returns an ISO8601 timestamp of when the product was created.

# product.description

Returns the description of the product.

# product.discounted

Returns true if the product has a discounted price. Returns false if not.

Returns the featured image of the product.

# product.first_available_variant

Returns the first available variant of the product.

# product.handle

Returns the slug of the product. Example: white-mountain-shoes

# product.has_only_default_variant

Returns true if the product only has one variant named 'Default'. Returns false if not.

# product.id

Returns the unique id of the product.

# product.images

Returns an array of all image objects of the product.

Example:

    <h1> {{ product.title }} </h1>
    <img src="{{ product.images[0].url }}">

# product.is_recurring

Returns true if any of its variants triggers a subscription. Returns false if not.

# product.metafields

Returns an object with all the metafields of the product.

Example:

    <h1> {{ product.title }} </h1>
    <h2> {{ product.metafields.subtitle }}

# product.meta_title

Returns the title of the product for search engines.

# product.meta_description

Returns the description of the product for search engines.

# product.options

Returns an array with all the names of the options of the product.

Example:

    <ul>
        <li> {{ product.options[0] }} </li>
    </ul>

Will return:

    <ul>
        <li> Size </li>
    </ul>

# product.options_with_values

Returns an array with all the options for the product with all the associated values to the options.

Example:

{% for product_option in product.options_with_values %}
    {{ product_option.name }}:
    <select>
        {% for value in product_option.values %}
            <option>
                {{ value }}
            </option>
        {% endfor %}
    </select>
{% endfor %}

Will return:

Size:
  <select>
    <option>Small</option>
    <option>Large</option>
  </select>

# product.price

Returns the price of the product.

# product.price_max

Returns the price of the expensivest variant of the product.

# product.price_min

Returns the price of the cheapest variant of the product.

# product.price_varies

Returns true if product variants has different prices. Returns false if not.

# product.quantity

Returns a sum of the quantity for all it's variants.

Returns an array of all related products to the product.

Returns an array of recommended products for the user based on the product.

# product.selected_variant

Returns selected variant of the product.

# product.selected_or_first_available_variant

Returns selected variant of first available variant of the product.

# product.tags

Returns an array of all tags of the product.

Example:

    <ul>
        {% for tag in product.tags %}
        <li> {{ tag }} </li>
        {% endfor %}
    </ul>

Will return:

    <ul>
        <li>sale</li>
        <li>news</li>
        <li>test</li>
    </ul>

# product.template_suffix

Returns the suffix of the specific liquid template used in the product. Returns null if the product is using the default template.

Example: something at product.something.liquid template file.

# product.title

Returns title of the product.

# product.type

Returns the name of the type of the product.

# product.updated_at

Returns an ISO8601 timestamp of when the product was last updated.

# product.url

Returns the url of the product.

# product.uuid

Returns the UUID of the product.

# product.variants

Returns an array of all variants of the product.

# product.vendor

Return the name of the vendor of the product.