|
44 | 44 | <a href="<% if (store.homepage) { %> <%= store.homepage %> <% } else{ %> https://<%= store.domain %> <% } %>"><img class="max-width" border="0" style="display:block;color:#000000;text-decoration:none;font-family:Helvetica, arial, sans-serif;font-size:16px;max-width:100% !important;width:100%;height:auto !important;" src="<%= store.logo.url %>" alt="" width="200"></a>
|
45 | 45 | </td></tr></tbody></table></td></tr></tbody></table>
|
46 | 46 |
|
47 |
| - <% if ( order.financial_status.current == 'unauthorized' || order.financial_status.current == 'voided') { %> |
| 47 | + <% if (order && order.financial_status && order.financial_status.current) { if ( order.financial_status.current == 'unauthorized' || order.financial_status.current == 'voided') { %> |
48 | 48 |
|
49 | 49 | <table class="module" style="padding:0px 10px 30px 10px;" role="module" data-type="text" border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed;">
|
50 | 50 | <tbody><tr>
|
|
208 | 208 |
|
209 | 209 | <% } %>
|
210 | 210 | <% } %>
|
| 211 | + <% } %> |
| 212 | + <% } else { %> |
211 | 213 |
|
| 214 | + <table class="module" style="padding:0px 10px 30px 10px;" role="module" data-type="text" border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed;"> |
| 215 | + <tbody><tr> |
| 216 | + <td style="padding:25px 20px 0px 20px;line-height:20px;text-align:center;" height="100%" valign="top" bgcolor=""> |
| 217 | + <h2><span style="color:#333333;"><%= i18n.hello %> <%= customer.name.given_name %>, <%= i18n.new_order_title %></span></h2> |
| 218 | + </td> |
| 219 | + </tr> |
| 220 | + </tbody> |
| 221 | + </table> |
| 222 | +
|
| 223 | + <table class="module" role="module" data-type="text" border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed;"> |
| 224 | + <tbody><tr> |
| 225 | + <td style="padding:10px 50px 10px 50px;line-height:22px;text-align:inherit;" height="100%" valign="top" bgcolor=""> |
| 226 | + <div style="text-align: center;"> |
| 227 | + <font color="#333333"> |
| 228 | + <%= i18n.new_order_text %> |
| 229 | + </font> |
| 230 | + </div> |
| 231 | + </td> |
| 232 | + </tr> |
| 233 | + </tbody> |
| 234 | + </table> |
| 235 | + <table border="0" cellpadding="0" cellspacing="10" class="module" data-role="module-button" data-type="button" role="module" style="table-layout:fixed" width="100%"><tbody><tr><td align="center" class="outer-td" style="padding:10px 0px 15px 0px"><table border="0" cellpadding="0" cellspacing="0" class="button-css__deep-table___2OZyb wrapper-mobile" style="text-align:center"><tbody><tr> |
| 236 | + <td align="center" bgcolor="<%= themeColor %>" class="inner-td" style="border-radius:6px;font-size:16px;text-align:center;background-color:inherit"><a class="btn" style="background-color:<%= themeColor %>;border:1px solid #333333;border-color:#FFFFFF;border-radius:3px;border-width:1px;color:#FFFFFF;display:inline-block;font-family:arial,helvetica,sans-serif;font-size:16px;font-weight:normal;letter-spacing:0px;line-height:16px;padding:12px 10px 12px 10px;text-align:center;text-decoration:none" href="<% if (order.status_link) { %> <%= order.status_link %> <% } else{ %> <% if (store.homepage) { %> <%= store.homepage %>/app/#/account/orders/<%= order.number %> <% } else{ %> https://<%= store.domain %>/app/#/account/orders/<%= order.number %> <% } %> <% } %>" target="_blank"><%= i18n.order_cta %></a></td> |
| 237 | + </tr> |
| 238 | + <tr> |
| 239 | + <td style="padding: 30px 45px 0px 45px;line-height:22px;text-align:inherit;" |
| 240 | + height="100%" |
| 241 | + valign="top" |
| 242 | + bgcolor=""> |
| 243 | + <div style="text-align: center;"><span style="color:#333333;"> |
| 244 | + <p><%= i18n.or %> <a href="<% if (store.homepage) { %> <%= store.homepage %> <% } else{ %> https://<%= store.domain %> <% } %>"><%= i18n.visit_store %></a> </p> |
| 245 | +
|
| 246 | + </span></div> |
| 247 | + </td> |
| 248 | + </tr> |
| 249 | + </tbody></table></td></tr></tbody></table> |
| 250 | +
|
| 251 | + <% } %> |
| 252 | +
|
| 253 | + <% if (order && order.financial_status && order.financial_status.current) { if ( order.financial_status.current != 'unauthorized' && order.financial_status.current != 'voided') { %> |
212 | 254 | <table class="module" role="module" data-type="text" border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed;">
|
213 | 255 | <tbody><tr>
|
214 | 256 | <% order.shipping_lines.forEach(shipping => { %>
|
|
246 | 288 | </td>
|
247 | 289 | </tr>
|
248 | 290 | </tbody></table></td></tr></tbody></table>
|
| 291 | + <% } %> |
| 292 | + <% } %> |
249 | 293 |
|
250 | 294 | <table class="module" role="module" data-type="text" border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed;">
|
251 | 295 | <tbody>
|
|
410 | 454 | </tr>
|
411 | 455 | </table>
|
412 | 456 |
|
413 |
| - <% } %> |
414 |
| -
|
415 |
| -
|
416 |
| -
|
417 | 457 |
|
418 | 458 | <table class="module"
|
419 | 459 | role="module"
|
|
0 commit comments