Created
March 29, 2016 18:09
-
-
Save yuchant/998d9184b7466d96cb45d8c52e3d5128 to your computer and use it in GitHub Desktop.
Shopify Iterate over options in cart
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
<div class="cart__options"> | |
{% for i in (0..2) %} | |
{% assign variant_option_key = i | plus: 1 | prepend: "option" %} | |
{% assign variant_value = item.variant[variant_option_key] %} | |
{% if variant_value %} | |
<div class="cart__option"> | |
{{ item.product.options[i] }}: {{ variant_value }} | |
</div> | |
{% endif %} | |
{% endfor %} | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment