Created
May 22, 2020 02:48
-
-
Save toledox82/68ad7c05cb81198cebbc6fb4fd715195 to your computer and use it in GitHub Desktop.
Shopify: Add product options (variants) on product listing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% 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