body.hbs 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. {{> header title="Order Receipt" }}
  2. <mj-raw>
  3. <style type="text/css">
  4. .callout {
  5. background-color: #375a67;
  6. padding: 15px 0;
  7. }
  8. .callout-large > div {
  9. text-align: center !important;
  10. color: #fff !important;
  11. font-size: 16px !important;
  12. font-weight: bold;
  13. padding: 0;
  14. }
  15. .callout-small > div {
  16. text-align: center !important;
  17. color: #fff !important;
  18. font-size: 14px !important;
  19. padding: 0;
  20. }
  21. ul.address {
  22. list-style-type: none;
  23. padding: 0;
  24. }
  25. tr.order-row td {
  26. border-bottom: 1px dashed #eee;
  27. }
  28. tr.order-row td:last-child {
  29. text-align: center;
  30. }
  31. tr.total-row {
  32. font-weight: bold;
  33. }
  34. .bg-off-white {
  35. background-color: #f5f5f5;
  36. }
  37. </style>
  38. </mj-raw>
  39. <mj-section css-class="bg-off-white">
  40. <mj-column>
  41. <mj-text>
  42. Dear {{ order.customer.firstName }} {{ order.customer.lastName }},
  43. </mj-text>
  44. <mj-text>
  45. Thank you for your order!
  46. </mj-text>
  47. </mj-column>
  48. </mj-section>
  49. <mj-section css-class="callout">
  50. <mj-column>
  51. <mj-text css-class="callout-large"><strong>Order Code</strong></mj-text>
  52. <mj-text css-class="callout-small">{{ order.code }}</mj-text>
  53. </mj-column>
  54. <mj-column>
  55. <mj-text css-class="callout-large"><strong>Order Date</strong></mj-text>
  56. <mj-text css-class="callout-small">{{ formatDate order.orderPlacedAt }}</mj-text>
  57. </mj-column>
  58. <mj-column>
  59. <mj-text css-class="callout-large"><strong>Total Price</strong></mj-text>
  60. <mj-text css-class="callout-small">{{ formatMoney order.total order.currencyCode 'en' }}</mj-text>
  61. </mj-column>
  62. </mj-section>
  63. <mj-section css-class="bg-off-white">
  64. <mj-column>
  65. <mj-text>
  66. {{#with order.shippingAddress }}
  67. <h3>Shipping To: {{ fullName }}</h3>
  68. <ul class="address">
  69. {{#if company}}<li>{{ company }}</li>{{/if}}
  70. {{#if streetLine1}}<li>{{ streetLine1 }}</li>{{/if}}
  71. {{#if streetLine2}}<li>{{ streetLine2 }}</li>{{/if}}
  72. {{#if city}}<li>{{ city }}</li>{{/if}}
  73. {{#if province}}<li>{{ province }}</li>{{/if}}
  74. {{#if postalCode}}<li>{{ postalCode }}</li>{{/if}}
  75. {{#if country}}<li>{{ country }}</li>{{/if}}
  76. {{#if phoneNumber}}<li>{{ phoneNumber }}</li>{{/if}}
  77. </ul>
  78. {{/with}}
  79. </mj-text>
  80. </mj-column>
  81. </mj-section>
  82. <mj-section>
  83. <mj-column>
  84. <mj-text>
  85. <h3>Order Summary:</h3>
  86. </mj-text>
  87. <mj-table cellpadding="6px">
  88. {{#each order.lines }}
  89. <tr class="order-row">
  90. <td>
  91. <img alt="{{ productVariant.name }}"
  92. style="width: 50px; height: 50px;"
  93. src="{{ featuredAsset.preview }}?w=50&h=50" />
  94. </td>
  95. <td>{{ quantity }} x {{ productVariant.name }}</td>
  96. <td>{{ productVariant.quantity }}</td>
  97. <td>{{ formatMoney discountedLinePriceWithTax ../order.currencyCode 'en' }}</td>
  98. </tr>
  99. {{/each}}
  100. {{#each order.discounts }}
  101. <tr class="order-row">
  102. <td colspan="3">
  103. {{ description }}
  104. </td>
  105. <td>{{ formatMoney amount ../order.currencyCode 'en' }}</td>
  106. </tr>
  107. {{/each}}
  108. <tr class="order-row">
  109. <td colspan="3">Sub-total:</td>
  110. <td>{{ formatMoney order.subTotalWithTax order.currencyCode 'en' }}</td>
  111. </tr>
  112. {{#each shippingLines }}
  113. <tr class="order-row">
  114. <td colspan="3">Shipping ({{ shippingMethod.name }}):</td>
  115. <td>{{ formatMoney priceWithTax ../order.currencyCode 'en' }}</td>
  116. </tr>
  117. {{/each}}
  118. <tr class="order-row total-row">
  119. <td colspan="3">Total:</td>
  120. <td>{{ formatMoney order.totalWithTax order.currencyCode 'en' }}</td>
  121. </tr>
  122. </mj-table>
  123. </mj-column>
  124. </mj-section>
  125. {{> footer }}