Created
April 8, 2017 11:00
-
-
Save anilmeena/e6a82a8cabdf0984aebee7c068282904 to your computer and use it in GitHub Desktop.
Shopify Display Multiple Variant Drop-down on Collection Page
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
<form action="/cart/add" method="post" style="text-align:center;"> | |
<select name="id"> | |
{% for variant in product.variants %} | |
{% if variant.available %} | |
<option value="{{ variant.id }}">{{ variant.title }} - {{ variant.price | money }}</option> | |
{% else %} | |
<option disabled="disabled">{{ variant.title }} - Sold Out</option> | |
{% endif %} | |
{% endfor %} | |
</select> | |
<input type="submit" value="Buy now" /> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I want all product variant inside a table with dropdown using js what should i do?