Created
December 29, 2012 20:27
-
-
Save Tetsuro/4409175 to your computer and use it in GitHub Desktop.
table snippet for part picker
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
{% assign linklist = linklists['part-picker'] %} | |
<form> | |
<table cellspacing="0" cellpadding="0" border="1"> | |
<tbody> | |
<tr id="cart-headlines"> | |
<td class="cart-thumb"> </td> | |
<td class="cart-title">Product Title</td> | |
<td class="cart-unitprice">Price</td> | |
<td class="cart-quantity">Quantity</td> | |
</tr> | |
{% for link in linklist.links %} | |
<tr> | |
<td style="width:60px;"> | |
<a href="" title="View Page"> | |
<img src="{{ link.object.featured_image | product_img_url: 'thumb' }}" alt="{{ link.object.title | escape }}" /> | |
</a> | |
</td> | |
<td> | |
<a href="{{ link.object.url}}" title="View {{item.title | escape }} Page"> | |
{{ link.object.title }} | |
</a> | |
<div>{{ link.object.description }}</div> | |
</td> | |
<td class="{{ link.object.id }}-price"> | |
{{ link.object.variants.first.price | money }} | |
</td> | |
<td class="item-{{ forloop.index0 }}"> | |
{% for variant in link.object.variants %} | |
<div> | |
<input type="radio" id="{{ link.object.id }}-{{ forloop.index0 }}" name="{{ link.object.handle }}" value="{{ variant.id }}" data-price="{{ variant.price }}" class="choice-button"/> | |
<label for="{{ link.object.id }}-{{ forloop.index0 }}">{{ variant.title }}</label> | |
</div> | |
{% endfor %} | |
</td> | |
</tr> | |
{% endfor %} | |
</tbody> | |
</table> | |
<p style='text-align:right;'> | |
<input type="submit" value="Add!" id="submit-table"/> | |
</p> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment