Created
October 9, 2017 21:39
-
-
Save vitohuang/e6db65d32ab2cd72230d457334908a3e to your computer and use it in GitHub Desktop.
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
<table> | |
<thead> | |
<th>{{ languages.productName }}</th> | |
<th>{{ languages.purchaseDate }}</th> | |
{% if shopSetting.extraFields %} | |
{% for field in shopSetting.extraFields %} | |
<th>{{ field.name }}</th> | |
{% endfor %} | |
{% endif %} | |
</thead> | |
<tbody> | |
{% for item in payload.items %} | |
<tr> | |
<td> | |
{% if item.product.handle %} | |
<a href="https://{{ shopName }}.myshopify.com/products/{{ item.product.handle }}"> | |
<img src="{{ item.product.imageUrl }}" width="100" height="100"/> | |
<br/> | |
{{ item.product.title }} | |
</a> | |
{% else %} | |
{% if item.product.imageUrl %} | |
<img src="{{ item.product.imageUrl }}" width="100" height="100"/> | |
<br/> | |
{% endif %} | |
{{ item.product.title }} | |
{% endif %} | |
</td> | |
<td>{{ item.purchaseDate }}</td> | |
{% if shopSetting.extraFields %} | |
{% for field in shopSetting.extraFields %} | |
{% for f in item.extraFields %} | |
{% if f.name == field.name %} | |
<td> | |
{% if f.type == 'image' && f.value %} | |
<a href="{{ f.value }}" target="_blank"> | |
<img width="100" height="100" src="{{ f.value }}" /> | |
</a> | |
{% else %} | |
{{ f.value }} | |
{% endif %} | |
</td> | |
{% endif %} | |
{% endfor %} | |
{% endfor %} | |
{% endif %} | |
</tr> | |
{% endfor %} | |
</tbody> | |
</table> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment