Created
October 20, 2014 14:20
-
-
Save fditrapani/1c958e02ba924a43ddcb to your computer and use it in GitHub Desktop.
This file contains hidden or 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
{% for option in product.options %} | |
{% if option == 'Color' %} | |
{% assign index = forloop.index0 %} | |
{% assign colorlist = '' %} | |
{% assign color = '' %} | |
{% for variant in product.variants %} | |
{% capture color %} | |
{{ variant.options[index] }} | |
{% endcapture %} | |
{% unless colorlist contains color %} | |
<img src="{{ color | downcase | append: '.gif' | asset_url }}" | |
alt="{{ color }}" width="16" height="16" /> | |
{% capture tempList %} | |
{{colorlist | append: color | append: ‘ ‘}} | |
{% endcapture %} | |
{% assign colorlist = tempList %} | |
{% endunless %} | |
{% endfor %} | |
{% endif %} | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So sick! thanks!!