Skip to content

Instantly share code, notes, and snippets.

@ShopifyEng
Created October 20, 2020 15:54

Revisions

  1. ShopifyEng created this gist Oct 20, 2020.
    19 changes: 19 additions & 0 deletions collection-loop-nested-2.liquid
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    // snippets/product-tile.liquid
    <h3>{{ product.title }}</h3>
    {% for option in product.options_with_values %}
    <p>
    {{ option.name }}:
    {% for value in option.values %}
    {{ value }}
    {% endfor %}
    </p>
    {% endfor %}

    {% for variant in product.variants %}
    <p>
    {% for option in variant.options %}
    {{ option }}
    {% endfor %}
    - {{ variant.id }}
    </p>
    {% endfor %}