|
97 | 97 | </tbody>
|
98 | 98 | </table>
|
99 | 99 |
|
| 100 | + <% if ( order.transactions.length > 0 ) { %> |
| 101 | +
|
100 | 102 | <% order.transactions.forEach(transaction => { %>
|
101 | 103 |
|
102 | 104 | <% if ( transaction.payment_method.code == 'banking_billet' ) { %>
|
|
144 | 146 |
|
145 | 147 | <% } %>
|
146 | 148 | <% }) %>
|
| 149 | + <% } %> |
147 | 150 |
|
148 | 151 | <% } else { if ( order.financial_status.current == 'paid') { %>
|
149 | 152 |
|
|
210 | 213 | <% } %>
|
211 | 214 | <% } %>
|
212 | 215 | <% } else { %>
|
213 |
| -
|
214 | 216 | <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 | 217 | <tbody><tr>
|
216 | 218 | <td style="padding:25px 20px 0px 20px;line-height:20px;text-align:center;" height="100%" valign="top" bgcolor="">
|
|
220 | 222 | </tbody>
|
221 | 223 | </table>
|
222 | 224 |
|
| 225 | + <% if ( order.transactions.length > 0 ) { %> |
| 226 | +
|
| 227 | + <% order.transactions.forEach(transaction => { %> |
| 228 | +
|
| 229 | + <% if ( transaction.payment_method.code == 'banking_billet' ) { %> |
| 230 | + <table class="module" role="module" data-type="text" border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed;"> |
| 231 | + <tbody><tr> |
| 232 | + <td style="padding:10px 50px 10px 50px;line-height:22px;text-align:inherit;" height="100%" valign="top" bgcolor=""> |
| 233 | + <div style="text-align: center;"> |
| 234 | + <font color="#333333"> |
| 235 | + <%= i18n.banking_billet_text %> <% if ( transaction.banking_billet.code ) { %> <%= i18n.banking_billet_code %> <% } %> |
| 236 | + </font> |
| 237 | + </div> |
| 238 | + </td> |
| 239 | + </tr> |
| 240 | + </tbody> |
| 241 | + </table> |
| 242 | +
|
| 243 | + <table class="module" style="padding:20px 30px 30px 30px;" role="module" data-type="text" border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed;"> |
| 244 | + <tbody><tr> |
| 245 | + <% if ( transaction.banking_billet.code ) { %> |
| 246 | + <td style="padding:0px 10px 0px 10px;line-height:20px;text-align:center;" bgcolor="#F4F4F4"> |
| 247 | + <h3><span style="color:#333333;"><%= transaction.banking_billet.code %></span></h3> |
| 248 | + </td> |
| 249 | + <% } %> |
| 250 | + <% if (transaction.banking_billet.link) { %> |
| 251 | + <td align="center" bgcolor="<%= themeColor %>" class="inner-td" style="font-size:16px;text-align:center;background-color:inherit"><a height="100%" class="sbtn" 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;text-align:center;text-decoration:none" href="<%= transaction.banking_billet.link %>" target="_blank"><%= i18n.banking_billet_print %></a></td> |
| 252 | + <% } %> |
| 253 | + </tr> |
| 254 | + </tbody> |
| 255 | + </table> |
| 256 | +
|
| 257 | + <% } else { %> |
| 258 | +
|
| 259 | + <table class="module" role="module" data-type="text" border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed;"> |
| 260 | + <tbody><tr> |
| 261 | + <td style="padding:10px 50px 10px 50px;line-height:22px;text-align:inherit;" height="100%" valign="top" bgcolor=""> |
| 262 | + <div style="text-align: center;"> |
| 263 | + <font color="#333333"> |
| 264 | + <%= i18n.new_order_text %> |
| 265 | + </font> |
| 266 | + </div> |
| 267 | + </td> |
| 268 | + </tr> |
| 269 | + </tbody> |
| 270 | + </table> |
| 271 | +
|
| 272 | + <% } %> |
| 273 | + <% }) %> |
| 274 | + <% } else { %> |
| 275 | +
|
223 | 276 | <table class="module" role="module" data-type="text" border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed;">
|
224 | 277 | <tbody><tr>
|
225 | 278 | <td style="padding:10px 50px 10px 50px;line-height:22px;text-align:inherit;" height="100%" valign="top" bgcolor="">
|
|
249 | 302 | </tbody></table></td></tr></tbody></table>
|
250 | 303 |
|
251 | 304 | <% } %>
|
| 305 | + <% } %> |
| 306 | +
|
| 307 | + <% if (order && order.financial_status && order.financial_status.current) { %> |
252 | 308 |
|
253 |
| - <% if (order && order.financial_status && order.financial_status.current) { if ( order.financial_status.current != 'unauthorized' && order.financial_status.current != 'voided') { %> |
| 309 | + <% if ( order.financial_status.current != 'unauthorized' || order.financial_status.current != 'voided') { %> |
254 | 310 | <table class="module" role="module" data-type="text" border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed;">
|
255 | 311 | <tbody><tr>
|
256 | 312 | <% order.shipping_lines.forEach(shipping => { %>
|
|
289 | 345 | </tr>
|
290 | 346 | </tbody></table></td></tr></tbody></table>
|
291 | 347 | <% } %>
|
| 348 | + <% } else {%> |
| 349 | +
|
| 350 | + <table class="module" role="module" data-type="text" border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed;"> |
| 351 | + <tbody><tr> |
| 352 | + <% order.shipping_lines.forEach(shipping => { %> |
| 353 | + <td style="padding:10px 50px 10px 50px;line-height:22px;text-align:inherit;" height="100%" valign="top" bgcolor=""> |
| 354 | + <div style="text-align: center;"> |
| 355 | + <font color="#333333"> |
| 356 | + <% if (shipping.posting_deadline) { %> |
| 357 | + <%= i18n.order %> <a 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 %> <% } %> <% } %>">#<%= order.number %></a> <%= i18n.posting_in %> <strong> <%= shipping.posting_deadline.days %> <% if (shipping.posting_deadline.working_days) { %> <%= i18n.working_days %> <% } else{ %> <%= i18n.days %> <% } %></strong> <%= i18n.after_payment %><%= i18n.following_address %> |
| 358 | + <% } else { %> |
| 359 | + <%= i18n.order %> <a 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 %> <% } %> <% } %>">#<%= order.number %></a> <%= i18n.delivering_in %> <strong> <%= shipping.delivery_time.days %> <% if (shipping.delivery_time.working_days) { %> <%= i18n.working_days %> <% } else{ %> <%= i18n.days %> <% } %></strong> <%= i18n.after_payment %> <%= i18n.on_following_address %> |
| 360 | + <% } %> |
| 361 | + </font> |
| 362 | + </div> |
| 363 | + <br> |
| 364 | + <div style="text-align: center;"><font color="#333333"><%= shipping.to.street %>, nº <%= shipping.to.number %></font></div> |
| 365 | + <div style="text-align: center;"><font color="#333333"><%= shipping.to.city %>, <%= shipping.to.province_code %>, <%= shipping.to.zip %></font></div> |
| 366 | + <div style="text-align: center;"><font color="#333333"><%= i18n.shipped_by %> <%= shipping.app.carrier %></font></div> |
| 367 | + </td> |
| 368 | + <% }) %> |
| 369 | + </tr> |
| 370 | + </tbody> |
| 371 | + </table> |
| 372 | + <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> |
| 373 | + <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> |
| 374 | + </tr> |
| 375 | + <tr> |
| 376 | + <td style="padding: 30px 45px 0px 45px;line-height:22px;text-align:inherit;" |
| 377 | + height="100%" |
| 378 | + valign="top" |
| 379 | + bgcolor=""> |
| 380 | + <div style="text-align: center;"><span style="color:#333333;"> |
| 381 | + <p><%= i18n.or %> <a href="<% if (store.homepage) { %> <%= store.homepage %> <% } else{ %> https://<%= store.domain %> <% } %>"><%= i18n.visit_store %></a> </p> |
| 382 | +
|
| 383 | + </span></div> |
| 384 | + </td> |
| 385 | + </tr> |
| 386 | + </tbody></table></td></tr></tbody></table> |
| 387 | +
|
292 | 388 | <% } %>
|
293 | 389 |
|
294 | 390 | <table class="module" role="module" data-type="text" border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed;">
|
|
0 commit comments