QUANTM7 Docs
QuillObjects

Product

The product object and all of its properties.

The product object holds everything about a single product. It is available on product pages and inside loops when you work with collections.

Core properties

PropertyTypeDescription
product.idnumberThe unique product ID
product.titlestringThe product title
product.handlestringThe URL slug (e.g. classic-gold-ring)
product.descriptionstringThe full HTML description
product.contentstringAlias for description
product.typestringThe product type (e.g. physical, digital, service)
product.brandstringThe brand name
product.vendorstringAlias for brand
product.urlstringThe URL path to the product page
product.availablebooleantrue if at least one variant is in stock
product.published_atstringThe date the product was published
product.created_atstringThe date the product was created
product.has_only_default_variantbooleantrue if the product has just one variant

Pricing

Prices are in the smallest currency unit (pence, cents). Use the money filter to format them.

PropertyTypeDescription
product.pricenumberThe lowest variant price
product.price_minnumberThe lowest variant price (same as price)
product.price_maxnumberThe highest variant price
product.price_variesbooleantrue if price_min differs from price_max
product.compare_at_pricenumberThe highest compare-at price across all variants
product.compare_at_price_minnumberThe lowest compare-at price across variants
product.compare_at_price_maxnumberThe highest compare-at price across variants
product.compare_at_price_variesbooleantrue if compare-at prices differ across variants
<p class="price">{{ product.price | money }}</p>

{% if product.compare_at_price > product.price %}
  <p class="compare-price">Was {{ product.compare_at_price | money }}</p>
{% endif %}

Price ranges

When a product has variants at different prices, show a range:

{% if product.price_varies %}
  <p>{{ product.price_min | money }} - {{ product.price_max | money }}</p>
{% else %}
  <p>{{ product.price | money }}</p>
{% endif %}

Images

PropertyTypeDescription
product.featured_imageimageThe first image
product.imagesarrayAll product images

Each image object has src, alt, width, height, and position properties. See the Image object for details.

{% if product.featured_image %}
  {{ product.featured_image | image_tag }}
{% endif %}

{% for image in product.images %}
  <img src="{{ image | img_url: '400x400' }}" alt="{{ image.alt }}" />
{% endfor %}

Variants

PropertyTypeDescription
product.variantsarrayAll variants for this product
product.optionsarrayOption names (e.g. ["Size", "Color"])
product.options_with_valuesarrayOptions with their available values
product.selected_variantvariantThe variant the visitor has picked, if any
product.first_available_variantvariantThe first variant that is in stock
product.selected_or_first_available_variantvariantThe selected variant, or falls back to the first available

See the Variant object for all variant properties.

Options with values

Each entry in options_with_values has a name and values array:

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

Variant picker

<select name="variant_id">
  {% for variant in product.variants %}
    <option value="{{ variant.id }}" {% unless variant.available %}disabled{% endunless %}>
      {{ variant.title }} - {{ variant.price | money }}
    </option>
  {% endfor %}
</select>

Tags and collections

PropertyTypeDescription
product.tagsarrayTags assigned to this product
product.collectionsarrayCollections this product belongs to

Each collection in the array is a lightweight reference with id, title, handle, and url.

{% if product.tags contains 'sale' %}
  <span class="badge">On Sale</span>
{% endif %}

{% for collection in product.collections %}
  <a href="{{ collection.url }}">{{ collection.title }}</a>
{% endfor %}

Shipping and fulfillment

PropertyTypeDescription
product.requires_shippingbooleantrue if any variant requires shipping
product.ships_to_countriesarrayCountry codes this product ships to, or nil if it ships everywhere
product.qty_stepnumberQuantity step increment (e.g. 1, 5, 10)
{% if product.ships_to_countries %}
  <p>Ships to {{ product.ships_to_countries | join: ', ' }}</p>
{% else %}
  <p>Ships worldwide</p>
{% endif %}

Product details

PropertyTypeDescription
product.product_detailsobjectStructured specs and attributes set in the admin

Product details hold data like size, weight, or care info:

{% if product.product_details.material %}
  <p>Material: {{ product.product_details.material }}</p>
{% endif %}

Metafields

PropertyTypeDescription
product.metafieldsobjectCustom data fields set in the admin

Access metafields by namespace and key:

{% if product.metafields.custom.care_instructions %}
  <p>{{ product.metafields.custom.care_instructions }}</p>
{% endif %}

Full example

A product card that shows the image, title, price, and a sale badge:

<div class="product-card">
  {% if product.featured_image %}
    <a href="{{ product.url }}">
      {{ product.featured_image | image_tag: class: 'product-card__image' }}
    </a>
  {% endif %}

  <h3><a href="{{ product.url }}">{{ product.title }}</a></h3>
  <p>{{ product.brand }}</p>

  {% if product.compare_at_price > product.price %}
    <span class="price price--sale">{{ product.price | money }}</span>
    <span class="price price--compare">{{ product.compare_at_price | money }}</span>
  {% else %}
    <span class="price">{{ product.price | money }}</span>
  {% endif %}

  {% unless product.available %}
    <span class="badge badge--soldout">Sold Out</span>
  {% endunless %}

  {% if product.tags contains 'new' %}
    <span class="badge">New</span>
  {% endif %}
</div>

On this page