Skip to content

Instantly share code, notes, and snippets.

@joe-dempsey
Created June 30, 2017 13:24
Show Gist options
  • Select an option

  • Save joe-dempsey/e29ee0516abbc9e948b25c6b8564bfec to your computer and use it in GitHub Desktop.

Select an option

Save joe-dempsey/e29ee0516abbc9e948b25c6b8564bfec to your computer and use it in GitHub Desktop.
Product colors shopify
{% comment %}
<!-- this loop is not so easy -->
<!-- need to accomodate for US/UK spellings -->
{% for option in product.options %}
{% if option contains 'Color' or option contains 'color' or option contains 'Colors' or option contains 'colors' or option contains 'Colour' or option contains 'colour' or option contains 'Colours' or option contains 'colours' %}
<p class="product-color">{{ product.variants.first.options[forloop.index0] }}</p>
{% endif %}
{% endfor %}
{% endcomment %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment