Skip to content

Instantly share code, notes, and snippets.

@cargix1
Last active February 28, 2016 13:12
Show Gist options
  • Save cargix1/b5062358da0da94ac6cd to your computer and use it in GitHub Desktop.
Save cargix1/b5062358da0da94ac6cd to your computer and use it in GitHub Desktop.
Order Confirmation v2.0
<p>Thank you for placing your order with {{ shop_name }}!</p>
<p>This email is to confirm your recent order.</p>
<p>Date {{ date | date: "%m/%d/%Y" }}</p>
{% if requires_shipping and shipping_address %}
<p><b>{% if attributes.Checkout-Method == "pickup" %}Pickup location{% elsif attributes.Checkout-Method == "delivery" %}Delivery address{% else %}Shipping address{% endif %}</b><br />
{% if attributes.Checkout-Method == "pickup" %}
{{ shipping_address.company }}<br />
{% else %}
{{ shipping_address.name }}<br />
{% endif %}
{{ shipping_address.street }}<br />
{{ shipping_address.city }}<br />
{{ shipping_address.province }}
{{ shipping_address.zip }}<br />
{{ shipping_address.country }}<br />
{% if attributes.Pickup-Date %}
<br />Pickup Date: {{ attributes.Pickup-Date | date: "%A, %-d %B %Y" }}<br />
{% endif %}
{% if attributes.Pickup-Time %}
Pickup Time: {{ attributes.Pickup-Time | date: "%R" }}<br />
{% endif %}
{% if attributes.Delivery-Date %}
<br />Delivery Date: {{ attributes.Delivery-Date | date: "%A, %-d %B %Y" }}<br />
{% endif %}
{% if attributes.Delivery-Time %}
Delivery Time: {{ attributes.Delivery-Time | date: "%R" }}<br />
{% endif %}
</p>
{% endif %}
{% if billing_address %}
<p><b>Billing address</b><br />
{{ billing_address.name }}<br />
{{ billing_address.street }}<br />
{{ billing_address.city }}<br />
{{ billing_address.province }}
{{ billing_address.zip }}<br />
{{ billing_address.country }}</p>
{% endif %}
<ul style="list-style-type:none">{% for line in line_items %}<li>{% assign item_price = 0 %}{% for price_item in line_items %}{% unless price_item.properties.builder_id == blank %}{% if price_item.properties.builder_id == line.properties.builder_id %}{% capture temp %}{{ item_price | plus: price_item.price }}{% endcapture %}{% assign item_price = temp %}{% endif %}{% endunless %}{% endfor %}{% if line.properties.builder_id == blank or line.properties.master_builder %}<img src="{{ line | img_url: 'thumb' }}" />{{ line.quantity }}x {{line.title }} for {% if line.properties.builder_id == blank %}{{ line.price | money }}{% else %}{{ item_price | money }}{% endif %} each {% for p in line.properties %}{% if p.first == "builder_id" or p.first == "builder_info" or p.first == "master_builder" or p.last == "" %}{% else %}{{ p.first }}: {% if p.last contains '/uploads/' %}<a class="lightbox" href="{{ p.last }}">{{ p.last | split: '/' | last }}</a><br>{% else %}{{ p.last }}<br>{% endif %}{% endif %}{% endfor %}{% endif %}</li>{% endfor %}</ul>
{% if discounts %}
<p>Discounts : {{ discounts_savings | money_with_currency }}</p> {% endif %}
<p>Subtotal : {{ subtotal_price | money_with_currency }}</p>
{% for tax_line in tax_lines %} <p>{{ tax_line.title }} : {{ tax_line.price | money_with_currency }} </p>
{% endfor %} {% if requires_shipping %}
<p>Shipping : {{ shipping_price | money_with_currency }}</p>
{% endif %} <p>Total : {{ total_price | money_with_currency }}</p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment