Created
December 11, 2016 00:37
-
-
Save drabbytux/0600b15ea8d05f6245f45b4e4c077f89 to your computer and use it in GitHub Desktop.
Make 'Pick and Option" by Default for product-template.liquid
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
<script> | |
var productOptions = []; | |
{% for option in product.options %} | |
var optionObj = {}; | |
optionObj[ {{ forloop.index0 }} ] = "{{ product.options[forloop.index0] }}"; | |
productOptions.push(optionObj); | |
{% endfor %} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment