variant
Properties
Returns true if the variant is available. Returns false if not.
The barcode of the variant.
The compare at price of the variant in the currency's subunit.
The value is output in the customer's local (presentment) currency.
Use money helpers to output a formatted price.
The image attached to the variant.
This is the same value as variant.image.
The first media object attached to the variant.
The ID of the variant.
The image attached to the variant.
This is the same value as variant.featured_image.
The inventory quantity of the variant.
If inventory isn't tracked, then 0 is returned.
The metafields applied to the variant.
To learn about how to create metafields, refer to Create and manage metafields or visit the Shopline Help Center.
The value of the variant for the first product option.
If there's no first product option, then null is returned.
The value of the variant for the second product option.
If there's no second product option, then null is returned.
The value of the variant for the third product option.
If there's no third product option, then null is returned.
The value of the variant for the fourth product option.
If there's no fourth product option, then null is returned.
The value of the variant for the fifth product option.
If there's no fifth product option, then null is returned.
The values of the variant for each product option.
{{#each product.variants as |variant|}}
{{variant.id}}: {{join variant.options '/'}}
{{/each}}
The price of the variant in the currency's subunit.
The value is output in the customer's local (presentment) currency.
Use money helpers to output a formatted price.
Returns true if the variant is set to require a selling_plan when being added to the cart. Returns false if not.
Returns true if the variant requires shipping. Returns false if it doesn't.
Returns true if the variant is currently selected. Returns false if it's not.
The selected variant is determined by the variant URL parameter. This URL parameter is available on product pages URLs only.
The selling_plan_allocation objects for the variant.
The SKU of the variant.
The store availabilities for the variant.
The array is defined in only the following cases:
variant.selectedistrue- The variant is the product's first available variant. For example,
product.first_available_variantorproduct.selected_or_first_available_variant.
Returns true if taxes should be charged on the variant. Returns false if not.
A concatenation of each variant option, separated by a /.
The URL of the variant.
Variant URLs use the following structure:
/products/[product-handle]?sku=[variant-id]
The weight of the variant in the unit specified by variant.weight_unit.
To output this weight, use this property, and the variant.weight_unit property, with the weight_with_unit helper.
The unit for the weight of the variant.
To output the weight of a variant in this unit, use this property, and the variant.weight_in_unit property, with the weight_with_unit helper.