This repository was archived by the owner on Oct 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtemplate.mjml
More file actions
259 lines (234 loc) · 9.9 KB
/
template.mjml
File metadata and controls
259 lines (234 loc) · 9.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
<mjml>
<mj-head>
<!-- Import fonts, external files here -->
<mj-title>Merchant Transactional Receipt</mj-title>
<mj-preview>Merchant Transactional Receipt</mj-preview>
<!-- Define device breakpoint here -->
<mj-breakpoint width="400px" />
<mj-attributes>
<!-- Define default styles here or create classes for components -->
<!-- Default styles END -->
<!-- Create class components here -->
<!-- Global font family -->
<mj-all font-family="Helvetica, sans-serif" />
<!-- Font sizes -->
<mj-class name="x-sml" font-size="12px" />
<mj-class name="sml" font-size="14px" />
<mj-class name="md" font-size="16px" />
<mj-class name="lg" font-size="18px" />
<mj-class name="x-lg" font-size="22px" />
<!-- Font Weights -->
<mj-class name="light" font-weight="300" />
<mj-class name="reg" font-weight="400" />
<mj-class name="med-w" font-weight="500" />
<mj-class name="semi-b" font-weight="600" />
<mj-class name="bold" font-weight="700" />
<!-- Line Heights -->
<mj-class name="g-height" line-height="45px" />
<mj-class name="p-height" line-height="35px" />
<mj-class name="r-height" line-height="25px" />
<mj-class name="s-height" line-height="20px" />
<!-- Colors -->
<mj-class name="light-grey" color="#D3E0F1" />
<mj-class name="grey" color="#7187A5" />
<mj-class name="dark-grey" color="#41556C" />
<!-- Background colors -->
<mj-class name="bg-grey" background-color="#F1F4FA" />
<!-- Border -->
<mj-class name="grey-border" border="1px solid #F1F4FA" />
<!-- Border Radius -->
<mj-class name="radius-sml" border-radius="3px" />
</mj-attributes>
</mj-head>
<mj-body background-color="white">
<mj-wrapper mj-class="grey-border">
<mj-section background-color="white" padding-bottom="0px" padding-top="20px" padding="20px 0">
<mj-column>
<!-- Insert your custom logo -->
<mj-image align="left" padding="10px 30px" src="https://chec.nyc3.digitaloceanspaces.com/email/assets/marketing/logo.png" target="_blank" width="110px" alt="logo"></mj-image>
<!-- Insert Logo END -->
</mj-column>
<mj-column>
<mj-text mj-class="light grey x-lg" align="right" padding-bottom="15px" padding-top="0px" padding="10px 25px">Receipt</mj-text>
</mj-column>
</mj-section>
<!-- Insert your custom greeting -->
<mj-section mj-class="section-white" padding-top="30px" padding-bottom="0">
<mj-column>
<mj-text mj-class="s-height">
Hi <strong>{{shipping.name}}</strong>,<br />
Thanks for your recent order. Please find all the details below.<br />
If you have any questions, feel free to <a href="mailto:your email" style="color:#3A465A;">contact us</a>.
</mj-text>
</mj-column>
</mj-section>
<mj-section padding="0">
<mj-column padding="0" width="100%">
<mj-divider border-width="1px" border-style="solid" border-color="#DCE4F3" />
</mj-column>
</mj-section>
<!-- Order Ref/Order Status -->
<mj-section >
<mj-column >
<mj-text mj-class="sml grey semi-b" align="left" padding="5px 25px">Order Ref.: <span style="color:black; font-weight:400;"mj-class="reg black">{{customer_reference}}</span></mj-text>
</mj-column>
<mj-column>
<mj-text mj-class="sml grey semi-b" align="right" padding="5px 25px">Order Status: <span style="color:black; font-weight:400;"mj-class="reg black">{{titlecase status_fulfillment}}</span></mj-text>
<mj-text mj-class="sml grey semi-b" align="right" padding="0 25px">Payment Status: <span style="color:black; font-weight:400;"mj-class="reg black">{{titlecase status_payment}}</span></mj-text>
</mj-column>
</mj-section>
<!-- Customer details section -->
<mj-section mj-class="bg-grey" padding="20px 0">
<mj-column>
<mj-text align="left" mj-class="sml dark-grey semi-b" padding-bottom="5px">Ordered on:</mj-text>
<mj-text padding-top="0" padding-bottom="0">{{date created}}</mj-text>
</mj-column>
<mj-column >
<mj-text align="left"mj-class="sml dark-grey semi-b" padding-bottom="5px">Customer email:</mj-text>
<mj-text padding-top="0" padding-bottom="0">{{customer.email}}</mj-text>
</mj-column>
<mj-column>
<mj-text mj-class="sml dark-grey semi-b" padding-bottom="5px">Shipping:
</mj-text>
<mj-text mj-class="s-height" padding-top="0" padding-bottom="0">
{{shipping.name}} <br />
{{shipping.street}} <br />
{{shipping.town_city}}, {{shipping.county_state}} <br />
{{shipping.postal_zip_code}}, {{shipping.country}} <br />
</mj-text>
</mj-column>
</mj-section>
<!-- Order Summary -->
<mj-section>
<mj-column width="100%">
<mj-text mj-class="med-w sml grey semi-b">Order Summary</mj-text>
</mj-column>
<!-- Divder -->
<mj-column width="100%">
<mj-divider border-width="1px" border-style="solid" border-color="#DCE4F3" />
</mj-column>
</mj-section>
<!-- Item details -->
<mj-section background-color="#ffffff" padding="10px 0">
<mj-group>
<!-- Item -->
<mj-column width="50%">
<mj-text align="left" mj-class="dark-grey">
<strong>Item</strong>
<mj-spacer height="20px" />
</mj-text>
<mj-text align="left">
{{#order.line_items}}
{{product_name}} <br/><br/>
{{/order.line_items}}
</mj-text>
</mj-column>
<!-- Qty -->
<mj-column width="20%">
<mj-text align="center" mj-class="dark-grey">
<strong>Qty</strong>
<mj-spacer height="20px" />
</mj-text>
<mj-text align="center">
{{#order.line_items}}
{{quantity}} <br/><br/>
{{/order.line_items}}
</mj-text>
</mj-column>
<!-- Price -->
<mj-column width="30%">
<mj-text align="right" >
<strong>Price</strong>
<mj-spacer height="20px" />
</mj-text>
<mj-text align="right">
{{#order.line_items}}
{{price.formatted_with_symbol}} <br/><br/>
{{/order.line_items}}
</mj-text>
</mj-column>
</mj-group>
</mj-section>
<!-- Total Section -->
<mj-section padding="0">
<mj-group>
<mj-column><!-- Blank Column --></mj-column>
<mj-column>
<mj-text mj-class="med-w grey semi-b" align="right">Subtotal: <span style="color:black; font-weight:400;"mj-class="reg black">{{order.subtotal.formatted_with_symbol}}</span></mj-text>
</mj-column>
</mj-section>
<mj-section padding="0">
<mj-column><!-- Blank Column --></mj-column>
<mj-column>
<mj-text mj-class="med-w grey semi-b" align="right">Discount: <span style="color:black; font-weight:400;"mj-class="reg black">-{{order.discount.amount_saved.formatted_with_symbol}}</span></mj-text>
</mj-column>
</mj-section>
<mj-section padding="0">
<mj-column><!-- Blank Column --></mj-column>
<mj-column>
<mj-text mj-class="med-w grey semi-b" align="right">Shipping: <span style="color:black; font-weight:400;"mj-class="reg black">{{order.shipping.price.formatted_with_symbol}}</span></mj-text>
</mj-column>
</mj-section>
<mj-section padding="0">
<mj-column><!-- Blank Column --></mj-column>
<mj-column>
<mj-text mj-class="med-w grey semi-b" align="right">Tax: <span style="color:black; font-weight:400;"mj-class="reg black">{{order.tax.amount.formatted_with_symbol}}</span></mj-text>
</mj-column>
</mj-section>
<mj-section padding="0">
<mj-column><!-- Blank Column --></mj-column>
<mj-column>
<mj-text mj-class="med-w grey semi-b" align="right">Total: <span style="color:black; font-weight:400;"mj-class="reg black">{{order.total.formatted_with_symbol}}</span></mj-text>
</mj-column>
</mj-section>
<!-- Billing Details -->
<mj-section>
<mj-column width="100%">
<mj-text mj-class="med-w sml grey semi-b">Billing and Payment</mj-text>
</mj-column>
<!-- Divder -->
<mj-column width="100%">
<mj-divider border-width="1px" border-style="solid" border-color="#DCE4F3" />
</mj-column>
</mj-section>
<mj-section background-color="#ffffff" padding="0">
<mj-column>
<mj-text mj-class="sml semi-b dark-grey">Billing Address</mj-text>
<mj-text padding-top="0" padding-bottom="0" mj-class="s-height">
{{#if collected.billing_address}}
{{#payments}}
{{payment_source.billing_zip_postal_code}}
{{/payments}}
<br/>
{{#payments}}
{{payment_source.tax_billing_country}}
{{/payments}}
{{/if}}
{{#unless collected.billing_address}}
No billing address was collected
{{/unless}}
</mj-text>
</mj-column>
<mj-column>
<mj-text mj-class="sml semi-b dark-grey">Payment Details</mj-text>
<mj-text padding-top="0" padding-bottom="0">
{{#payments}}
{{titlecase payment_source.brand}} **** **** **** {{reference}}
{{/payments}}
</mj-text>
</mj-column>
</mj-section>
<mj-section>
<mj-column width="100%">
<mj-divider border-width="1px" border-style="solid" border-color="#DCE4F3" />
</mj-column>
</mj-section>
<mj-section>
<mj-column >
<mj-text align="center" mj-class="sml">Thank you for your order!</mj-text>
<mj-text align="center" mj-class="x-sml grey r-height">If you have any questions about your bill, please get in touch with us by replying to this email!</mj-text>
</mj-column>
</mj-section>
</mj-wrapper>
</mj-body>
</mjml>