Skip to content

Instantly share code, notes, and snippets.

@toledox82
Created May 22, 2020 02:48
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 toledox82/68ad7c05cb81198cebbc6fb4fd715195 to your computer and use it in GitHub Desktop.
Save toledox82/68ad7c05cb81198cebbc6fb4fd715195 to your computer and use it in GitHub Desktop.
Shopify: Add product options (variants) on product listing
{% if product.options[0] == 'Size' %}
<small>Sizes:
{% for sizes in product.options_by_name['Size'].values %}
{% if forloop.last == true %}
{{ sizes }}
{% else %}
{{ sizes | append: ', ' }}
{% endif %}
{% endfor %}
</small>
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment