variant
A product variant.
Available in: product.variants, product.selected_variant…
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
variant.id |
string | ID (send as id to /cart/add). |
variant.title |
string | Title (S / Black). |
variant.sku |
string | SKU. |
variant.barcode |
string | Barcode. |
variant.price |
number | Price. |
variant.compare_at_price |
number | Compare-at price. |
variant.available |
boolean | Can be bought. |
variant.inventory_management |
string | Whether stock is tracked. |
variant.inventory_policy |
string | continue or deny when sold out. |
variant.option1 |
string | First option value. |
variant.option2 |
string | Second option value. |
variant.option3 |
string | Third option value. |
variant.options |
array | Option values. |
variant.featured_image |
image | Image. |
variant.weight |
number | Weight in grams. |
variant.weight_unit |
string | Weight unit. |
variant.requires_shipping |
boolean | Ships. |
variant.taxable |
boolean | Taxed. |
variant.quantity_rule |
object | min, max and increment. |
variant.url |
string | Product URL with ?variant=. |
variant.product |
product | The product. |
Example
Section titled “Example”{% for v in product.variants %}{{ v.title }}{% unless v.available %} (sold out){% endunless %}{% unless forloop.last %}, {% endunless %}{% endfor %}S / Sand, M / Sand, L / Sand (sold out)Compatibility
Section titled “Compatibility”Since theme platform 1.0.
Was this page helpful?

