Skip to content

Instantly share code, notes, and snippets.

@keithgreer
Last active December 23, 2021 10:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keithgreer/de8ce1b80ec38e55d066872645fcce4a to your computer and use it in GitHub Desktop.
Save keithgreer/de8ce1b80ec38e55d066872645fcce4a to your computer and use it in GitHub Desktop.
Shopify: List product variations on collection pages - https://keithgreer.dev/shopify-list-product-variations-on-collection-pages
{% comment %}{% for option in product.options %}
{% if option == 'Weight' %}
{% assign index = forloop.index0 %}
{% for variant in product.variants %}
{{ variant.options[index] }}
{% endfor %}
{% endif %}
{% endfor %}{% endcomment %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment