Created
September 22, 2019 17:15
-
-
Save carlitoescobar/b07b4110b8e87fb430433a281d1b93b1 to your computer and use it in GitHub Desktop.
Shopify select box to show list of products in a collection
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
<select onchange="javascript:location.href = this.value;"> | |
{% for p in collection.products %} | |
{% unless p.id == product.id %} | |
<option value="{{ p.url | within: collection }}">{{ p.title }}</option> | |
{% endunless %} | |
{% endfor %} | |
</select> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment