Skip to content

Instantly share code, notes, and snippets.

@hkstemclub
Forked from r8r/order-template.liquid
Last active April 29, 2023 23:54
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 hkstemclub/0b2bec9e308606e4f3d704f4aa83f154 to your computer and use it in GitHub Desktop.
Save hkstemclub/0b2bec9e308606e4f3d704f4aa83f154 to your computer and use it in GitHub Desktop.
Shopify Order Printer Template with transaction, logo image
<p style="float: right; text-align: right; margin: 0;"><b>
{{ "now" | date: "%d/%m/%Y" }}<br />
Receipt for {{ order_name }}</b>
</p>
<div style="float: left; margin: 0 0 1.5em 0;" >
<table border=0><tr>
<td><img src="https://www2.hkstem.club/wp-content/uploads/2017/04/logo.png" width=80% height=80% /></td>
<td><strong style="font-size: 1em;">ON LUCK HONG KONG GROUP LIMITED</strong><br />
{{ shop.address }}{{ shop.address1 }}{{ shop.address2 }}<br/>
{{ shop.city }} {{ shop.province_code }} {{ shop.zip | upcase }}<br/>
{{ shop.country }}
</td></tr>
</table>
</div>
<hr />
<h3 style="margin: 0 0 1em 0;">Order Details</h3>
<table class="table-tabular" style="margin: 0 0 1.5em 0;">
<thead>
<tr>
<th>Item</th><th>Quantity</th>
{% if show_line_item_taxes %}
<th>Taxes</th>
{% endif %}
<th>Price</th>
</tr>
</thead>
<tbody>
{% for line_item in line_items %}
<tr>
<td>{{ line_item.title }}</td>
<td>{{ line_item.quantity }}</td>
{% if show_line_item_taxes %}
<td>
{% for tax_line in line_item.tax_lines %}
{{ tax_line.price | money }} {{ tax_line.title }}<br/>
{% endfor %}
</td>
{% endif %}
<td>
{% if line_item.original_price != line_item.price %}
<s>{{ line_item.original_price | money }}</s>
{% endif %}
{{ line_item.price | money }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
<!--<h3 style="margin: 0 0 1em 0;">Payment Details</h3>-->
<table class="table-tabular" style="margin: 0 0 1.5em 0;">
<tr>
<td>Subtotal price:</td>
<td>{{ subtotal_price | money }}</td>
</tr>
{% for discount in discounts %}
<tr>
<td>Includes discount "{{ discount.code }}"</td>
<td>{{ discount.savings | money }}</td>
</tr>
{% endfor %}
{% if shipping_address %}
<tr>
<td>Shipping:</td>
<td>{{ shipping_price | money }}</td>
</tr>
{% endif %}
<tr>
<td><strong>Total price:</strong></td>
<td><strong>{{ total_price | money }}</strong></td>
</tr>
{% if total_paid != total_price %}
<tr>
<td><strong>Total paid:</strong></td>
<td><strong>{{ total_paid | money }}</strong></td>
</tr>
<tr>
<td><strong>Outstanding Amount:</strong></td>
<td><strong>{{ total_price | minus: total_paid | money }}</strong></td>
</tr>
{% endif %}
</table>
{% for transaction in transactions %}
<h3 style="margin: 0 0 1em 0;">Transaction Details</h3>
<table class="table-tabular" style="margin: 0 0 1.5em 0;">
<thead>
<tr>
<th>Type</th>
<th>Amount</th>
<th>Status</th>
</tr>
</thead>
<tbody>
{% for transaction in transactions %}
<tr>
<td>{{ transaction.gateway | payment_method }}{{ transaction.gateway_display_name }}</td>
<td>{{ transaction.amount | money }}</td>
<td>{{ transaction.status }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endfor %}
{% if note %}
<h3 style="margin: 0 0 1em 0;">Note</h3>
<p>{{ note }}</p>
{% endif %}
{% if shipping_address %}
<h3 style="margin: 0 0 1em 0;">Shipping Address </h3>
<div style="margin: 0 0 1em 0; padding: 1em; border: 1px solid black;">
<strong>{{ shipping_address.name }}</strong><br/>
{{ shipping_address | format_address }}<br/>
{{ shipping_address.phone }}<br/>
</div>
{% endif %}
<p>Thank you for your order! </p>
<p>If you have any questions, please send an email to <u>{{ shop.email }}</u></p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment