@vendure/email-plugin 3.2.0 → 3.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.md CHANGED
@@ -1,42 +1,42 @@
1
- # License
2
- Copyright (C) Vendure GmbH
3
-
4
- This software is available under two different licenses:
5
- * GNU General Public License version 3 (GPLv3) as Vendure Community Edition
6
- * Vendure Commercial License (VCL)
7
-
8
- The default Vendure license, without a valid Vendure Commercial License agreement, is the Open-Source GPLv3 license.
9
-
10
- ## GNU General Public License version 3 (GPLv3)
11
-
12
- If you decide to choose the GPLv3 license, you must comply with the following terms:
13
-
14
- This program is free software: you can redistribute it and/or modify
15
- it under the terms of the GNU General Public License as published by
16
- the Free Software Foundation, either version 3 of the License, or
17
- (at your option) any later version.
18
-
19
- This program is distributed in the hope that it will be useful,
20
- but WITHOUT ANY WARRANTY; without even the implied warranty of
21
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
- GNU General Public License for more details.
23
-
24
- You should have received a copy of the GNU General Public License
25
- along with this program. If not, see <http://www.gnu.org/licenses/>.
26
-
27
- Additional permission under GNU GPL version 3 section 7:
28
-
29
- An additional exception under section 7 of the GPL is included in the plugin-exception.txt file,
30
- which allows you to distribute Vendure plugins (i.e. extensions) under a different license.
31
-
32
- ## Vendure Commercial License (VCL)
33
-
34
- Alternatively, commercial and supported versions of the program - also known as
35
- Commercial Distributions - must be used in accordance with the terms and conditions
36
- contained in a separate written agreement between you and Vendure GmbH.
37
- For more information about the Vendure Commercial License (VCL) please contact contact@vendure.io.
38
-
39
- Please see also:
40
-
41
- - [Licensing FAQ - license-faq.md](license/license-faq.md)
42
- - [GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 - gpl-3.0.txt](license/gpl-3.0.txt)
1
+ # License
2
+ Copyright (C) Vendure GmbH
3
+
4
+ This software is available under two different licenses:
5
+ * GNU General Public License version 3 (GPLv3) as Vendure Community Edition
6
+ * Vendure Commercial License (VCL)
7
+
8
+ The default Vendure license, without a valid Vendure Commercial License agreement, is the Open-Source GPLv3 license.
9
+
10
+ ## GNU General Public License version 3 (GPLv3)
11
+
12
+ If you decide to choose the GPLv3 license, you must comply with the following terms:
13
+
14
+ This program is free software: you can redistribute it and/or modify
15
+ it under the terms of the GNU General Public License as published by
16
+ the Free Software Foundation, either version 3 of the License, or
17
+ (at your option) any later version.
18
+
19
+ This program is distributed in the hope that it will be useful,
20
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
21
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
+ GNU General Public License for more details.
23
+
24
+ You should have received a copy of the GNU General Public License
25
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
26
+
27
+ Additional permission under GNU GPL version 3 section 7:
28
+
29
+ An additional exception under section 7 of the GPL is included in the plugin-exception.txt file,
30
+ which allows you to distribute Vendure plugins (i.e. extensions) under a different license.
31
+
32
+ ## Vendure Commercial License (VCL)
33
+
34
+ Alternatively, commercial and supported versions of the program - also known as
35
+ Commercial Distributions - must be used in accordance with the terms and conditions
36
+ contained in a separate written agreement between you and Vendure GmbH.
37
+ For more information about the Vendure Commercial License (VCL) please contact contact@vendure.io.
38
+
39
+ Please see also:
40
+
41
+ - [Licensing FAQ - license-faq.md](license/license-faq.md)
42
+ - [GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 - gpl-3.0.txt](license/gpl-3.0.txt)
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
- # Vendure EmailPlugin
2
-
3
- The `EmailPlugin` generates and sends emails based on Vendure server events.
4
-
5
- `npm install @vendure/email-plugin`
6
-
7
- For documentation, see [docs.vendure.io/reference/core-plugins/email-plugin/](https://docs.vendure.io/reference/core-plugins/email-plugin/)
1
+ # Vendure EmailPlugin
2
+
3
+ The `EmailPlugin` generates and sends emails based on Vendure server events.
4
+
5
+ `npm install @vendure/email-plugin`
6
+
7
+ For documentation, see [docs.vendure.io/reference/core-plugins/email-plugin/](https://docs.vendure.io/reference/core-plugins/email-plugin/)
package/dev-mailbox.html CHANGED
@@ -1,218 +1,218 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <title>Vendure Development Inbox</title>
6
- <style>
7
- body {
8
- display: flex;
9
- flex-direction: column;
10
- height: 100vh;
11
- margin: 0;
12
- font-family: Helvetica, Arial, sans-serif;
13
- }
14
- .top-bar {
15
- padding: 12px;
16
- display: flex;
17
- align-items: center;
18
- background-color: #2a2929;
19
- color: #efefef;
20
- height: 60px;
21
- }
22
- .heading {
23
- margin: 0;
24
- font-size: 22px;
25
- }
26
- button#refresh {
27
- margin-left: 12px;
28
- border-radius: 3px;
29
- display: flex;
30
- align-items: center;
31
- }
32
- button#refresh .label {
33
- margin-left: 6px;
34
- }
35
- .generate-controls {
36
- flex: 1;
37
- display: flex;
38
- justify-content: flex-end;
39
- }
40
- input,
41
- select,
42
- button {
43
- padding: 6px;
44
- border-radius: 3px;
45
- border: 1px solid #0b384b;
46
- margin-left: 3px;
47
- }
48
- button {
49
- text-transform: uppercase;
50
- font-size: 12px;
51
- transition: background-color 0.2s;
52
- padding: 0 12px;
53
- height: 32px;
54
- }
55
- button:hover {
56
- background-color: #efefef;
57
- }
58
- #language-code {
59
- width: 32px;
60
- }
61
- .content {
62
- display: flex;
63
- flex: 1;
64
- height: calc(100% - 60px);
65
- }
66
- .list {
67
- width: 40vw;
68
- min-width: 300px;
69
- overflow: auto;
70
- }
71
- .row {
72
- border-bottom: 1px dashed #ddd;
73
- padding: 12px 6px;
74
- cursor: pointer;
75
- transition: background-color 0.2s;
76
- }
77
- .row.selected {
78
- background-color: #d4e1e7;
79
- }
80
- .row:not(.selected):hover {
81
- background-color: #efefef;
82
- }
83
- .meta {
84
- display: flex;
85
- justify-content: space-between;
86
- color: #666;
87
- }
88
- .detail {
89
- flex: 1;
90
- border: 1px solid #999;
91
- display: flex;
92
- flex-direction: column;
93
- }
94
- .detail iframe {
95
- height: 100%;
96
- border: 1px solid #eee;
97
- overflow: auto;
98
- }
99
- .metadata {
100
- padding: 6px;
101
- color: #333;
102
- background-color: white;
103
- z-index: 1;
104
- box-shadow: 0px 5px 8px -7px rgba(0, 0, 0, 0.49);
105
- }
106
- </style>
107
- </head>
108
- <body>
109
- <div class="top-bar">
110
- <h1 class="heading">Vendure Dev Mailbox</h1>
111
- <div class="generate-controls">
112
- <select id="type-selector"></select>
113
- <input id="language-code" value="en" type="text" />
114
- <button id="generate-test">Generate test</button>
115
- </div>
116
- </div>
117
- <div class="content">
118
- <div class="list"></div>
119
- <div class="detail"></div>
120
- </div>
121
- <script>
122
- let selectedId = '';
123
- const normalizePath = (endpoint) => {
124
- const pathname = location.pathname;
125
- return pathname.endsWith('/') ? `${pathname}${endpoint}` : `${pathname}/${endpoint}`;
126
- };
127
- refreshInbox();
128
- setInterval(refreshInbox, 5000);
129
-
130
- const typeSelect = document.querySelector('#type-selector');
131
- fetch(normalizePath('types'))
132
- .then((res) => res.json())
133
- .then((res) => {
134
- res.forEach((type) => {
135
- const option = document.createElement('option');
136
- option.value = type;
137
- option.text = type;
138
- typeSelect.appendChild(option);
139
- });
140
- });
141
-
142
- const languageCodeInput = document.querySelector('#language-code');
143
- const generateTestButton = document.querySelector('#generate-test');
144
- generateTestButton.addEventListener('click', (e) => {
145
- fetch(normalizePath(`generate/${typeSelect.value}/${languageCodeInput.value}`))
146
- .then(() => new Promise((resolve) => setTimeout(resolve, 500)))
147
- .then(() => refreshInbox());
148
- });
149
-
150
- const list = document.querySelector('.list');
151
-
152
- function refreshInbox() {
153
- fetch(normalizePath('list'))
154
- .then((res) => res.json())
155
- .then((res) => renderList(res));
156
- }
157
-
158
- function renderList(items) {
159
- const list = document.querySelector('.list');
160
- list.innerHTML = '';
161
- const rows = items.forEach((item) => {
162
- const row = document.createElement('div');
163
- row.classList.add('row');
164
- row.dataset.id = item.fileName;
165
- row.innerHTML = `
166
- <div class="meta">
167
- <div class="date">${item.date}</div>
168
- <div class="recipient">${item.recipient}</div>
169
- </div>
170
- <div class="subject">${item.subject}</div>`;
171
-
172
- row.addEventListener('click', (e) => {
173
- selectedId = item.fileName;
174
- fetch(normalizePath('item/' + item.fileName))
175
- .then((res) => res.json())
176
- .then((res) => renderEmail(res))
177
- .then(() => highlightSelectedRow());
178
- });
179
- list.appendChild(row);
180
- });
181
- highlightSelectedRow();
182
- }
183
-
184
- function highlightSelectedRow() {
185
- document.querySelectorAll('.list .row').forEach((row) => {
186
- row.classList.remove('selected');
187
- if (row.dataset.id === selectedId) {
188
- row.classList.add('selected');
189
- }
190
- });
191
- }
192
-
193
- function renderEmail(email) {
194
- const content = `
195
- <div class="metadata">
196
- <table>
197
- <tr>
198
- <td>Recipient:</td>
199
- <td>${email.recipient}</td>
200
- </tr>
201
- <tr>
202
- <td>Subject:</td>
203
- <td>${email.subject}</td>
204
- </tr>
205
- <tr>
206
- <td>Date:</td>
207
- <td>${new Date().toLocaleString()}</td>
208
- </tr>
209
- </table>
210
- </div>
211
- <iframe srcdoc="${email.body.replace(/"/g, '&quot;')}"></iframe>
212
- `;
213
-
214
- document.querySelector('.detail').innerHTML = content;
215
- }
216
- </script>
217
- </body>
218
- </html>
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <title>Vendure Development Inbox</title>
6
+ <style>
7
+ body {
8
+ display: flex;
9
+ flex-direction: column;
10
+ height: 100vh;
11
+ margin: 0;
12
+ font-family: Helvetica, Arial, sans-serif;
13
+ }
14
+ .top-bar {
15
+ padding: 12px;
16
+ display: flex;
17
+ align-items: center;
18
+ background-color: #2a2929;
19
+ color: #efefef;
20
+ height: 60px;
21
+ }
22
+ .heading {
23
+ margin: 0;
24
+ font-size: 22px;
25
+ }
26
+ button#refresh {
27
+ margin-left: 12px;
28
+ border-radius: 3px;
29
+ display: flex;
30
+ align-items: center;
31
+ }
32
+ button#refresh .label {
33
+ margin-left: 6px;
34
+ }
35
+ .generate-controls {
36
+ flex: 1;
37
+ display: flex;
38
+ justify-content: flex-end;
39
+ }
40
+ input,
41
+ select,
42
+ button {
43
+ padding: 6px;
44
+ border-radius: 3px;
45
+ border: 1px solid #0b384b;
46
+ margin-left: 3px;
47
+ }
48
+ button {
49
+ text-transform: uppercase;
50
+ font-size: 12px;
51
+ transition: background-color 0.2s;
52
+ padding: 0 12px;
53
+ height: 32px;
54
+ }
55
+ button:hover {
56
+ background-color: #efefef;
57
+ }
58
+ #language-code {
59
+ width: 32px;
60
+ }
61
+ .content {
62
+ display: flex;
63
+ flex: 1;
64
+ height: calc(100% - 60px);
65
+ }
66
+ .list {
67
+ width: 40vw;
68
+ min-width: 300px;
69
+ overflow: auto;
70
+ }
71
+ .row {
72
+ border-bottom: 1px dashed #ddd;
73
+ padding: 12px 6px;
74
+ cursor: pointer;
75
+ transition: background-color 0.2s;
76
+ }
77
+ .row.selected {
78
+ background-color: #d4e1e7;
79
+ }
80
+ .row:not(.selected):hover {
81
+ background-color: #efefef;
82
+ }
83
+ .meta {
84
+ display: flex;
85
+ justify-content: space-between;
86
+ color: #666;
87
+ }
88
+ .detail {
89
+ flex: 1;
90
+ border: 1px solid #999;
91
+ display: flex;
92
+ flex-direction: column;
93
+ }
94
+ .detail iframe {
95
+ height: 100%;
96
+ border: 1px solid #eee;
97
+ overflow: auto;
98
+ }
99
+ .metadata {
100
+ padding: 6px;
101
+ color: #333;
102
+ background-color: white;
103
+ z-index: 1;
104
+ box-shadow: 0px 5px 8px -7px rgba(0, 0, 0, 0.49);
105
+ }
106
+ </style>
107
+ </head>
108
+ <body>
109
+ <div class="top-bar">
110
+ <h1 class="heading">Vendure Dev Mailbox</h1>
111
+ <div class="generate-controls">
112
+ <select id="type-selector"></select>
113
+ <input id="language-code" value="en" type="text" />
114
+ <button id="generate-test">Generate test</button>
115
+ </div>
116
+ </div>
117
+ <div class="content">
118
+ <div class="list"></div>
119
+ <div class="detail"></div>
120
+ </div>
121
+ <script>
122
+ let selectedId = '';
123
+ const normalizePath = (endpoint) => {
124
+ const pathname = location.pathname;
125
+ return pathname.endsWith('/') ? `${pathname}${endpoint}` : `${pathname}/${endpoint}`;
126
+ };
127
+ refreshInbox();
128
+ setInterval(refreshInbox, 5000);
129
+
130
+ const typeSelect = document.querySelector('#type-selector');
131
+ fetch(normalizePath('types'))
132
+ .then((res) => res.json())
133
+ .then((res) => {
134
+ res.forEach((type) => {
135
+ const option = document.createElement('option');
136
+ option.value = type;
137
+ option.text = type;
138
+ typeSelect.appendChild(option);
139
+ });
140
+ });
141
+
142
+ const languageCodeInput = document.querySelector('#language-code');
143
+ const generateTestButton = document.querySelector('#generate-test');
144
+ generateTestButton.addEventListener('click', (e) => {
145
+ fetch(normalizePath(`generate/${typeSelect.value}/${languageCodeInput.value}`))
146
+ .then(() => new Promise((resolve) => setTimeout(resolve, 500)))
147
+ .then(() => refreshInbox());
148
+ });
149
+
150
+ const list = document.querySelector('.list');
151
+
152
+ function refreshInbox() {
153
+ fetch(normalizePath('list'))
154
+ .then((res) => res.json())
155
+ .then((res) => renderList(res));
156
+ }
157
+
158
+ function renderList(items) {
159
+ const list = document.querySelector('.list');
160
+ list.innerHTML = '';
161
+ const rows = items.forEach((item) => {
162
+ const row = document.createElement('div');
163
+ row.classList.add('row');
164
+ row.dataset.id = item.fileName;
165
+ row.innerHTML = `
166
+ <div class="meta">
167
+ <div class="date">${item.date}</div>
168
+ <div class="recipient">${item.recipient}</div>
169
+ </div>
170
+ <div class="subject">${item.subject}</div>`;
171
+
172
+ row.addEventListener('click', (e) => {
173
+ selectedId = item.fileName;
174
+ fetch(normalizePath('item/' + item.fileName))
175
+ .then((res) => res.json())
176
+ .then((res) => renderEmail(res))
177
+ .then(() => highlightSelectedRow());
178
+ });
179
+ list.appendChild(row);
180
+ });
181
+ highlightSelectedRow();
182
+ }
183
+
184
+ function highlightSelectedRow() {
185
+ document.querySelectorAll('.list .row').forEach((row) => {
186
+ row.classList.remove('selected');
187
+ if (row.dataset.id === selectedId) {
188
+ row.classList.add('selected');
189
+ }
190
+ });
191
+ }
192
+
193
+ function renderEmail(email) {
194
+ const content = `
195
+ <div class="metadata">
196
+ <table>
197
+ <tr>
198
+ <td>Recipient:</td>
199
+ <td>${email.recipient}</td>
200
+ </tr>
201
+ <tr>
202
+ <td>Subject:</td>
203
+ <td>${email.subject}</td>
204
+ </tr>
205
+ <tr>
206
+ <td>Date:</td>
207
+ <td>${new Date().toLocaleString()}</td>
208
+ </tr>
209
+ </table>
210
+ </div>
211
+ <iframe srcdoc="${email.body.replace(/"/g, '&quot;')}"></iframe>
212
+ `;
213
+
214
+ document.querySelector('.detail').innerHTML = content;
215
+ }
216
+ </script>
217
+ </body>
218
+ </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vendure/email-plugin",
3
- "version": "3.2.0",
3
+ "version": "3.2.2",
4
4
  "license": "GPL-3.0-or-later",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -9,6 +9,10 @@
9
9
  "templates/**/*",
10
10
  "dev-mailbox.html"
11
11
  ],
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "https://github.com/vendure-ecommerce/vendure"
15
+ },
12
16
  "scripts": {
13
17
  "watch": "tsc -p ./tsconfig.build.json --watch",
14
18
  "build": "rimraf lib && tsc -p ./tsconfig.build.json",
@@ -34,10 +38,10 @@
34
38
  "@types/express": "^4.17.21",
35
39
  "@types/fs-extra": "^11.0.4",
36
40
  "@types/mjml": "^4.7.4",
37
- "@vendure/common": "^3.2.0",
38
- "@vendure/core": "^3.2.0",
41
+ "@vendure/common": "3.2.2",
42
+ "@vendure/core": "3.2.2",
39
43
  "rimraf": "^5.0.5",
40
44
  "typescript": "5.8.2"
41
45
  },
42
- "gitHead": "58c173ac0c7854ff53809d69f34a496f3eff1910"
46
+ "gitHead": "8729e7f8f028be556543c8e971e750228e516919"
43
47
  }
@@ -1,20 +1,20 @@
1
- {{> header title="Verify Your New Email Address" }}
2
-
3
- <mj-section background-color="#fafafa">
4
- <mj-column>
5
- <mj-text color="#525252">
6
- We received a request to change your registered email address to this one.
7
- Click the button below to verify this address and complete the process:
8
- </mj-text>
9
-
10
- <mj-button font-family="Helvetica"
11
- background-color="#f45e43"
12
- color="white"
13
- href="{{ changeEmailAddressUrl }}?token={{ identifierChangeToken }}">
14
- Verify Me!
15
- </mj-button>
16
- </mj-column>
17
- </mj-section>
18
-
19
-
20
- {{> footer }}
1
+ {{> header title="Verify Your New Email Address" }}
2
+
3
+ <mj-section background-color="#fafafa">
4
+ <mj-column>
5
+ <mj-text color="#525252">
6
+ We received a request to change your registered email address to this one.
7
+ Click the button below to verify this address and complete the process:
8
+ </mj-text>
9
+
10
+ <mj-button font-family="Helvetica"
11
+ background-color="#f45e43"
12
+ color="white"
13
+ href="{{ changeEmailAddressUrl }}?token={{ identifierChangeToken }}">
14
+ Verify Me!
15
+ </mj-button>
16
+ </mj-column>
17
+ </mj-section>
18
+
19
+
20
+ {{> footer }}
@@ -1,20 +1,20 @@
1
- {{> header title="Verify Your Email Address" }}
2
-
3
- <mj-section background-color="#fafafa">
4
- <mj-column>
5
- <mj-text color="#525252">
6
- Thank you for creating an account. Click the button below to verify this email address and
7
- complete the registration process:
8
- </mj-text>
9
-
10
- <mj-button font-family="Helvetica"
11
- background-color="#f45e43"
12
- color="white"
13
- href="{{ verifyEmailAddressUrl }}?token={{ verificationToken }}">
14
- Verify Me!
15
- </mj-button>
16
- </mj-column>
17
- </mj-section>
18
-
19
-
20
- {{> footer }}
1
+ {{> header title="Verify Your Email Address" }}
2
+
3
+ <mj-section background-color="#fafafa">
4
+ <mj-column>
5
+ <mj-text color="#525252">
6
+ Thank you for creating an account. Click the button below to verify this email address and
7
+ complete the registration process:
8
+ </mj-text>
9
+
10
+ <mj-button font-family="Helvetica"
11
+ background-color="#f45e43"
12
+ color="white"
13
+ href="{{ verifyEmailAddressUrl }}?token={{ verificationToken }}">
14
+ Verify Me!
15
+ </mj-button>
16
+ </mj-column>
17
+ </mj-section>
18
+
19
+
20
+ {{> footer }}
@@ -1,133 +1,133 @@
1
- {{> header title="Order Receipt" }}
2
-
3
- <mj-raw>
4
- <style type="text/css">
5
- .callout {
6
- background-color: #375a67;
7
- padding: 15px 0;
8
- }
9
- .callout-large > div {
10
- text-align: center !important;
11
- color: #fff !important;
12
- font-size: 16px !important;
13
- font-weight: bold;
14
- padding: 0;
15
- }
16
- .callout-small > div {
17
- text-align: center !important;
18
- color: #fff !important;
19
- font-size: 14px !important;
20
- padding: 0;
21
- }
22
- ul.address {
23
- list-style-type: none;
24
- padding: 0;
25
- }
26
- tr.order-row td {
27
- border-bottom: 1px dashed #eee;
28
- }
29
- tr.order-row td:last-child {
30
- text-align: center;
31
- }
32
- tr.total-row {
33
- font-weight: bold;
34
- }
35
- .bg-off-white {
36
- background-color: #f5f5f5;
37
- }
38
- </style>
39
- </mj-raw>
40
-
41
- <mj-section css-class="bg-off-white">
42
- <mj-column>
43
- <mj-text>
44
- Dear {{ order.customer.firstName }} {{ order.customer.lastName }},
45
- </mj-text>
46
- <mj-text>
47
- Thank you for your order!
48
- </mj-text>
49
- </mj-column>
50
- </mj-section>
51
-
52
-
53
- <mj-section css-class="callout">
54
- <mj-column>
55
- <mj-text css-class="callout-large"><strong>Order Code</strong></mj-text>
56
- <mj-text css-class="callout-small">{{ order.code }}</mj-text>
57
- </mj-column>
58
- <mj-column>
59
- <mj-text css-class="callout-large"><strong>Order Date</strong></mj-text>
60
- <mj-text css-class="callout-small">{{ formatDate order.orderPlacedAt }}</mj-text>
61
- </mj-column>
62
- <mj-column>
63
- <mj-text css-class="callout-large"><strong>Total Price</strong></mj-text>
64
- <mj-text css-class="callout-small">{{ formatMoney order.total order.currencyCode 'en' }}</mj-text>
65
- </mj-column>
66
- </mj-section>
67
-
68
-
69
- <mj-section css-class="bg-off-white">
70
- <mj-column>
71
- <mj-text>
72
- {{#with order.shippingAddress }}
73
- <h3>Shipping To: {{ fullName }}</h3>
74
- <ul class="address">
75
- {{#if company}}<li>{{ company }}</li>{{/if}}
76
- {{#if streetLine1}}<li>{{ streetLine1 }}</li>{{/if}}
77
- {{#if streetLine2}}<li>{{ streetLine2 }}</li>{{/if}}
78
- {{#if city}}<li>{{ city }}</li>{{/if}}
79
- {{#if province}}<li>{{ province }}</li>{{/if}}
80
- {{#if postalCode}}<li>{{ postalCode }}</li>{{/if}}
81
- {{#if country}}<li>{{ country }}</li>{{/if}}
82
- {{#if phoneNumber}}<li>{{ phoneNumber }}</li>{{/if}}
83
- </ul>
84
- {{/with}}
85
- </mj-text>
86
- </mj-column>
87
- </mj-section>
88
-
89
- <mj-section>
90
- <mj-column>
91
- <mj-text>
92
- <h3>Order Summary:</h3>
93
- </mj-text>
94
- <mj-table cellpadding="6px">
95
- {{#each order.lines }}
96
- <tr class="order-row">
97
- <td>
98
- <img alt="{{ productVariant.name }}"
99
- style="width: 50px; height: 50px;"
100
- src="{{ featuredAsset.preview }}?w=50&h=50" />
101
- </td>
102
- <td>{{ quantity }} x {{ productVariant.name }}</td>
103
- <td>{{ productVariant.quantity }}</td>
104
- <td>{{ formatMoney discountedLinePriceWithTax ../order.currencyCode 'en' }}</td>
105
- </tr>
106
- {{/each}}
107
- {{#each order.discounts }}
108
- <tr class="order-row">
109
- <td colspan="3">
110
- {{ description }}
111
- </td>
112
- <td>{{ formatMoney amount ../order.currencyCode 'en' }}</td>
113
- </tr>
114
- {{/each}}
115
- <tr class="order-row">
116
- <td colspan="3">Sub-total:</td>
117
- <td>{{ formatMoney order.subTotalWithTax order.currencyCode 'en' }}</td>
118
- </tr>
119
- {{#each shippingLines }}
120
- <tr class="order-row">
121
- <td colspan="3">Shipping ({{ shippingMethod.name }}):</td>
122
- <td>{{ formatMoney priceWithTax ../order.currencyCode 'en' }}</td>
123
- </tr>
124
- {{/each}}
125
- <tr class="order-row total-row">
126
- <td colspan="3">Total:</td>
127
- <td>{{ formatMoney order.totalWithTax order.currencyCode 'en' }}</td>
128
- </tr>
129
- </mj-table>
130
- </mj-column>
131
- </mj-section>
132
-
133
- {{> footer }}
1
+ {{> header title="Order Receipt" }}
2
+
3
+ <mj-raw>
4
+ <style type="text/css">
5
+ .callout {
6
+ background-color: #375a67;
7
+ padding: 15px 0;
8
+ }
9
+ .callout-large > div {
10
+ text-align: center !important;
11
+ color: #fff !important;
12
+ font-size: 16px !important;
13
+ font-weight: bold;
14
+ padding: 0;
15
+ }
16
+ .callout-small > div {
17
+ text-align: center !important;
18
+ color: #fff !important;
19
+ font-size: 14px !important;
20
+ padding: 0;
21
+ }
22
+ ul.address {
23
+ list-style-type: none;
24
+ padding: 0;
25
+ }
26
+ tr.order-row td {
27
+ border-bottom: 1px dashed #eee;
28
+ }
29
+ tr.order-row td:last-child {
30
+ text-align: center;
31
+ }
32
+ tr.total-row {
33
+ font-weight: bold;
34
+ }
35
+ .bg-off-white {
36
+ background-color: #f5f5f5;
37
+ }
38
+ </style>
39
+ </mj-raw>
40
+
41
+ <mj-section css-class="bg-off-white">
42
+ <mj-column>
43
+ <mj-text>
44
+ Dear {{ order.customer.firstName }} {{ order.customer.lastName }},
45
+ </mj-text>
46
+ <mj-text>
47
+ Thank you for your order!
48
+ </mj-text>
49
+ </mj-column>
50
+ </mj-section>
51
+
52
+
53
+ <mj-section css-class="callout">
54
+ <mj-column>
55
+ <mj-text css-class="callout-large"><strong>Order Code</strong></mj-text>
56
+ <mj-text css-class="callout-small">{{ order.code }}</mj-text>
57
+ </mj-column>
58
+ <mj-column>
59
+ <mj-text css-class="callout-large"><strong>Order Date</strong></mj-text>
60
+ <mj-text css-class="callout-small">{{ formatDate order.orderPlacedAt }}</mj-text>
61
+ </mj-column>
62
+ <mj-column>
63
+ <mj-text css-class="callout-large"><strong>Total Price</strong></mj-text>
64
+ <mj-text css-class="callout-small">{{ formatMoney order.total order.currencyCode 'en' }}</mj-text>
65
+ </mj-column>
66
+ </mj-section>
67
+
68
+
69
+ <mj-section css-class="bg-off-white">
70
+ <mj-column>
71
+ <mj-text>
72
+ {{#with order.shippingAddress }}
73
+ <h3>Shipping To: {{ fullName }}</h3>
74
+ <ul class="address">
75
+ {{#if company}}<li>{{ company }}</li>{{/if}}
76
+ {{#if streetLine1}}<li>{{ streetLine1 }}</li>{{/if}}
77
+ {{#if streetLine2}}<li>{{ streetLine2 }}</li>{{/if}}
78
+ {{#if city}}<li>{{ city }}</li>{{/if}}
79
+ {{#if province}}<li>{{ province }}</li>{{/if}}
80
+ {{#if postalCode}}<li>{{ postalCode }}</li>{{/if}}
81
+ {{#if country}}<li>{{ country }}</li>{{/if}}
82
+ {{#if phoneNumber}}<li>{{ phoneNumber }}</li>{{/if}}
83
+ </ul>
84
+ {{/with}}
85
+ </mj-text>
86
+ </mj-column>
87
+ </mj-section>
88
+
89
+ <mj-section>
90
+ <mj-column>
91
+ <mj-text>
92
+ <h3>Order Summary:</h3>
93
+ </mj-text>
94
+ <mj-table cellpadding="6px">
95
+ {{#each order.lines }}
96
+ <tr class="order-row">
97
+ <td>
98
+ <img alt="{{ productVariant.name }}"
99
+ style="width: 50px; height: 50px;"
100
+ src="{{ featuredAsset.preview }}?w=50&h=50" />
101
+ </td>
102
+ <td>{{ quantity }} x {{ productVariant.name }}</td>
103
+ <td>{{ productVariant.quantity }}</td>
104
+ <td>{{ formatMoney discountedLinePriceWithTax ../order.currencyCode 'en' }}</td>
105
+ </tr>
106
+ {{/each}}
107
+ {{#each order.discounts }}
108
+ <tr class="order-row">
109
+ <td colspan="3">
110
+ {{ description }}
111
+ </td>
112
+ <td>{{ formatMoney amount ../order.currencyCode 'en' }}</td>
113
+ </tr>
114
+ {{/each}}
115
+ <tr class="order-row">
116
+ <td colspan="3">Sub-total:</td>
117
+ <td>{{ formatMoney order.subTotalWithTax order.currencyCode 'en' }}</td>
118
+ </tr>
119
+ {{#each shippingLines }}
120
+ <tr class="order-row">
121
+ <td colspan="3">Shipping ({{ shippingMethod.name }}):</td>
122
+ <td>{{ formatMoney priceWithTax ../order.currencyCode 'en' }}</td>
123
+ </tr>
124
+ {{/each}}
125
+ <tr class="order-row total-row">
126
+ <td colspan="3">Total:</td>
127
+ <td>{{ formatMoney order.totalWithTax order.currencyCode 'en' }}</td>
128
+ </tr>
129
+ </mj-table>
130
+ </mj-column>
131
+ </mj-section>
132
+
133
+ {{> footer }}
@@ -1,10 +1,10 @@
1
- <!--suppress ALL -->
2
- <mj-section background-color="#375a67">
3
- <mj-column width="100%">
4
- <mj-text align="center" color="#eee">
5
- <span>[footer text]</span>
6
- </mj-text>
7
- </mj-column>
8
- </mj-section>
9
- </mj-body>
10
- </mjml>
1
+ <!--suppress ALL -->
2
+ <mj-section background-color="#375a67">
3
+ <mj-column width="100%">
4
+ <mj-text align="center" color="#eee">
5
+ <span>[footer text]</span>
6
+ </mj-text>
7
+ </mj-column>
8
+ </mj-section>
9
+ </mj-body>
10
+ </mjml>
@@ -1,18 +1,18 @@
1
- <mjml>
2
- <mj-head>
3
- <mj-title>{{ title }}</mj-title>
4
- <mj-style inline="inline">
5
- h3 {
6
- font-size: 18px;
7
- color: #555;
8
- font-weight: normal;
9
- }
10
- </mj-style>
11
- </mj-head>
12
-
13
- <mj-body>
14
- <mj-section background-color="#f0f0f0">
15
- <mj-column>
16
- <mj-text>[company header]</mj-text>
17
- </mj-column>
18
- </mj-section>
1
+ <mjml>
2
+ <mj-head>
3
+ <mj-title>{{ title }}</mj-title>
4
+ <mj-style inline="inline">
5
+ h3 {
6
+ font-size: 18px;
7
+ color: #555;
8
+ font-weight: normal;
9
+ }
10
+ </mj-style>
11
+ </mj-head>
12
+
13
+ <mj-body>
14
+ <mj-section background-color="#f0f0f0">
15
+ <mj-column>
16
+ <mj-text>[company header]</mj-text>
17
+ </mj-column>
18
+ </mj-section>
@@ -1,24 +1,24 @@
1
- {{> header title="Forgotten password reset" }}
2
-
3
- <mj-section background-color="#fafafa">
4
- <mj-column>
5
- <mj-text color="#525252">
6
- Someone requested a new password for your account.
7
- </mj-text>
8
-
9
- <mj-button font-family="Helvetica"
10
- background-color="#f45e43"
11
- color="white"
12
- href="{{ passwordResetUrl }}?token={{ passwordResetToken }}">
13
- Reset password
14
- </mj-button>
15
-
16
- <mj-text color="#525252">
17
- If you didn't make this request then you can safely ignore this email - nothing has been changed on your account.
18
- </mj-text>
19
-
20
- </mj-column>
21
- </mj-section>
22
-
23
-
24
- {{> footer }}
1
+ {{> header title="Forgotten password reset" }}
2
+
3
+ <mj-section background-color="#fafafa">
4
+ <mj-column>
5
+ <mj-text color="#525252">
6
+ Someone requested a new password for your account.
7
+ </mj-text>
8
+
9
+ <mj-button font-family="Helvetica"
10
+ background-color="#f45e43"
11
+ color="white"
12
+ href="{{ passwordResetUrl }}?token={{ passwordResetToken }}">
13
+ Reset password
14
+ </mj-button>
15
+
16
+ <mj-text color="#525252">
17
+ If you didn't make this request then you can safely ignore this email - nothing has been changed on your account.
18
+ </mj-text>
19
+
20
+ </mj-column>
21
+ </mj-section>
22
+
23
+
24
+ {{> footer }}