Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. {% if product.variants.size > 1 %}
  2.  
  3. {% if product.options[1] %}
  4. {% assign used = '' %}
  5. <div class="color-variant">
  6. <span><b>{{ product.options[1] }} :</b></span>
  7. <select id='select-one' onchange="letsDoThis()">
  8. {% for variant in product.variants %}
  9. {% unless used contains variant.option2 %}
  10. <option {% if variant == product.selected_or_first_available_variant %} selected="selected" {% endif %} data-id={{variant.id}}>{{ variant.option2 }}</option>
  11. {% capture used %}{{ used }} {{ variant.option2 }}{% endcapture %}
  12. {% endunless %}
  13. {% endfor %}
  14. </select>
  15. {% endif %}
  16. </div>
  17. {% if product.options[0] %}
  18. {% assign used = '' %}
  19. <span class="size"><b>{{ product.options[0] }} :</b></span>
  20. <div class="size-variant-style">
  21. {% for variant in product.variants %}
  22. {% unless used contains variant.option1 %}
  23.  
  24. <input type="radio" id="{{variant.id}}" class="radio-btnnn" name="size" onchange="letsDoThis()" value="{{ variant.option1 }}"/><label for="{{variant.id}}"><span class="size-variant">{{ variant.option1 }}</span></label>
  25.  
  26.  
  27. {% capture used %}{{ used }} {{ variant.option1 }}{% endcapture %}
  28. {% endunless %}
  29. {% endfor %}
  30. </div>
  31.  
  32. {% endif %}
  33. {% endif %}
  34. <div id="price"></div>
  35. <input type="hidden"name="id" id="product-select" value="{{ product.variants.first.id }}" />
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement