Product

Loop All Variants

Iterates every variant (size, color, etc.) on a product.

Copy or embed this snippet

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

Embed this snippet on your blog or docs — attribution link appreciated: HTMLToLiquid Converter · Convert to Shopify section →

Generate Shopify sections

Free AI-powered converter — OS 2.0 compatible output with schema validation.

Start converting HTML