Skip to content

Instantly share code, notes, and snippets.

@suture
Created September 27, 2015 07:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save suture/be247f3d03c31505ca5a to your computer and use it in GitHub Desktop.
Save suture/be247f3d03c31505ca5a to your computer and use it in GitHub Desktop.
Shopify - Display some custom fields on Product pages for items from a specific Collection
<!--
A Quick test to display some custom fields on Product pages for items from the "Bowls" collection
https://docs.shopify.com/support/your-store/products/how-do-I-collect-additional-information-on-the-product-page-Like-for-a-monogram-engraving-or-customization
-->
{% if collection.handle == 'bowls' %}
<div class="property-wrapper">
<p>Size</p>
<input class="radio" type="radio" id="1" name="properties[Second Property]" value="First Option"> <label for="first-option">1</label>
<input class="radio" type="radio" id="2" name="properties[Second Property]" value="Second Option"> <label for="second-option">2</label>
<input class="radio" type="radio" id="3" name="properties[Second Property]" value="Third Option"> <label for="third-option">3</label>
<input class="radio" type="radio" id="4" name="properties[Second Property]" value="Fourth Option"> <label for="fourth-option">4</label>
<input class="radio" type="radio" id="5" name="properties[Second Property]" value="Fifth Option"> <label for="fifth-option">5</label>
</div>
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment