Das Template <keyword>order_confirmation_html.liquid</keyword> rendert die E-Mail Bestellbestätigung als HTML. Für die alterantive Plain text Darstellung, kann das Template <keyword>order_confirmation.liquid</keyword> verwendet werden.
Das Template muss unter <keyword>templates/email/order_confirmation_html.liquid</keyword> abgelegt werden.
Innerhalb des <keyword>order_confirmation_html.liquid</keyword> Templates stehen folgende Objekte zur Verfügung:
Das nachfolgend Beispiel zeigt vereinfacht die Ausgabe einer HTML Bestellbestätigung. Über die Variable <liquid>mail_subject</liquid> kann der Betreff gesetzt werden.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<body>
<table border="0" align="center" cellpadding="0" cellspacing="0" style="font-size: 12px; font-family:Arial">
<tr>
<td>
<table align="center" cellspacing="0" width="630" style="font-size: 12px; font-family:Arial; line-height:15px">
<tr>
<td height="20"> </td>
</tr>
<tr>
<td valign="bottom">
<span style="font-size:14; font-weight:bold;">Thank you for your order at {{ shop.name }}</span><br/><br/>
<span style="font-size:12;">Order-ID {{ order.id }}</span>
</td>
</tr>
<tr>
<td height="5"> </td>
</tr>
<tr><td height="1" style="border-bottom:1px solid #f77825"> </td></tr>
</table>
</td>
</tr>
</table>
<table width="630" align="center" style="font-size:12px; font-family:Arial; line-height:15px" border="0" align="left" cellpadding="2" cellspacing="2">
<tr height="15"><td colspan="3"> </td></tr>
<tr height="1"><td colspan="3"> </td></tr>
<tr height="20" style="background-color:#DDD">
<td width="420" valign="middle" align="center"><strong>Product</strong></td>
<td valign="middle" align="right"><strong>Price </strong></td>
<td valign="middle" align="right"><strong>Total </strong></td>
</tr>
<!-- order positions -->
{% for line_item in order.line_items %}
<tr>
<td>
<table width="420" border="0" cellpadding="0" cellspacing="0" style="font-size: 12px; font-family:Arial; line-height:15px">
<tr>
<td><strong>{{ line_item.name }}</strong></td>
</tr>
<tr height="6"><td> </td></tr>
<tr>
<td>
<table width="350" border="0" cellpadding="0" cellspacing="0" style="font-size: 12px; font-family:Arial; line-height:15px">
<tr>
<td width="65"><img width="60" src="https://{{ line_item.featured_media | product_media_url:'small' }}"></td>
<td width="145" align="left" valign="top">
<span style="color:#555;">Product no.<br/>{{ line_item.sku }}</span>
<br/><br/>
</td>
<td width="140" align="left" valign="top">
{{ 'product.amount' | t }}: {{ line_item.item_quantity }}
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td align="right" valign="top">
<br />
{{ shop.locale.iso_currency_symbol }} {{ line_item.price | number:'currency' }}
</td>
</tr>
<tr><td colspan="3" height="1" style="border-bottom:1px solid #ddd"> </td></tr>
{% endfor %}
<tr height="30"> <td colspan="3"> </td> </tr>
</table>
</body>
</html>{% capture mail_subject %}Your order at {{ shop.name }}{% endcapture %}