Order mail example

This is an example order mail of category delivery.

Usage:

  1. Go to the Order mails module in the Settings app and create a new order mail
  2. Copy-paste the html from below into the definition

  1 <html>
  2 <head>
  3     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  4     <title>Ticketmatic</title>
  5     <style type="text/css" media="screen">
  6         body, td, th {
  7           line-height: 1.5;
  8           font-size: 13px;
  9         }
 10 
 11         body {
 12           color: #333;
 13           font-family: Arial, sans-serif;
 14           background: #FFF;
 15           max-width: 660px;
 16           margin: 0 auto;
 17         }
 18 
 19         a,
 20         a:link {
 21             color: #000 !important;
 22             font-weight: 700;
 23         }
 24 
 25 
 26         th {
 27           text-align: left;
 28         }
 29 
 30         .table {
 31           width: 100%;
 32         }
 33 
 34         .table tfoot {
 35           font-weight: 700;
 36         }
 37 
 38         .table td,
 39         .table th {
 40           border-bottom: 1px solid #DDD;
 41           padding: 5px;
 42         }
 43 
 44         h1, h2, h3, h4 {
 45             color: #000;
 46         }
 47     </style>
 48 </head>
 49 <body>
 50     <br>
 51     <center>
 52        <table cellspacing="0" cellpadding="0">
 53           <tr>
 54              <td width="3%">
 55                  
 56              </td>
 57              <td width="92%" class="content">
 58                 <p translate>Dear,</p>
 59                 <p translate>Thank you very much for your order at {{account.name}}.</p>
 60                  
 61                 {% if order.allowetickets|default(15001)==15001 %}
 62                     <p translate>Please contact the box office to receive your tickets.</p>
 63                 {% elseif order.allowetickets|default(0)==15002 %}
 64                     <p translate>This is the way to receive your tickets:</p>
 65                     <ul>
 66                        <li><span translate>Print them yourself: </span><a href="{{ urls.pdf | raw }}" translate>download your e-tickets as pdf</a> <span translate>and then print them out.</span></li>
 67                     </ul>
 68                     <p translate>Store your printed tickets in a safe place. Make sure that your ticket won't be copied. Each ticket contains a unique barcode that
 69                      will be scanned at the entrance of the event.</p>
 70                 {% elseif order.allowetickets|default(0)==15003 %}
 71                     <p translate>There are two ways to receive your tickets:</p>
 72                      <ul>
 73                          <li><span translate>Print them yourself: </span><a href="{{ urls.pdf | raw }}" translate>download your e-tickets as pdf</a> <span translate>and then print them out.</span></li>
 74                          <li><span translate>Open the Ticketmatic app on your smartphone and receive the tickets automatically. No need to print them anymore.</li>
 75                      </ul>
 76                     <p translate>Store your printed tickets in a safe place. Make sure that your ticket won't be copied. Each ticket contains a unique barcode that
 77                      will be scanned at the entrance of the event.</p>
 78                 {% endif %}
 79 
 80                 <p translate>Review the details of your order here:</p>
 81 
 82                 <ul>
 83                     <li><span translate>Order number: </span>{{ order.id }}</li>
 84                     <li><span translate>Order date: </span>{{ order.createdts|date("d/m/Y") }}</li>
 85                 </ul>
 86 
 87                 <table class="table" cellspacing="0" cellpadding="0">
 88                     <thead>
 89                         <tr>
 90                             <th translate>Date</th>
 91                             <th translate>Item</th>
 92                             <th translate>Number</th>
 93                             <th translate>Subtotal</th>
 94                         </tr>
 95                     </thead>
 96                     <tfoot>
 97                         <tr>
 98                             <td colspan="2"> </td>
 99                             <td translate>Total</td>
100                             <td>€ {{ order.totalamount|number_format(2) }}</td>
101                         </tr>
102                     </tfoot>
103                     <tbody>
104                         {% for event in events %}
105                             {% for tickettypeprice in event.tickettypeprices %}
106                             <tr>
107                                 <td>{{ event.date|date("d/m/Y H:i") }}</td>
108                                 <td>{{ event.name }} - {{ tickettypeprice.pricetypename }}</td>
109                                 <td>{{ tickettypeprice.ticketsummary.count }}</td>
110                                 <td>€ {{ (tickettypeprice.ticketsummary.ticketfee|default(0) + tickettypeprice.ticketsummary.price)|number_format(2) }}</td>
111                             </tr>
112                             {% endfor %}
113                         {% endfor %}
114 
115                         {% for product in products %}
116                             <tr>
117                                <td></td>
118                                <td>{{lookup.products[product.productid].name|default('')}}</td>
119                                <td>1</td>
120                                <td>€ {{ product.price|default(0)|number_format(2) }}</td>
121                             </tr>
122                         {% endfor %}
123                         {% for cost in ordercosts %}
124                         <tr>
125                             <td></td>
126                             <td colspan=2>{{ cost.name }}</td>
127                             <td>€ {{ cost.amount|number_format(2) }}</td>
128                         </tr>
129                         {% endfor %}
130                     </tbody>
131                 </table>
132 
133                 <p translate>Kind regards,</p>
134 
135              </td>
136              <td width="3%">
137                  
138              </td>
139           </tr>
140        </table>
141     </center>
142     <br>
143 </body>
144 </html>

Questions?

We're always happy to help! Send us an e-mail