Skip to content

Commit e03617d

Browse files
committed
feat(mails): specifing texts when picking order up
1 parent af70459 commit e03617d

10 files changed

+363
-167
lines changed

i18n/en_us.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -110,5 +110,9 @@
110110
"link": "link",
111111
"stock_title": "A product you’ve wished is on stock",
112112
"promo_title": "A product you’ve wished is for sale",
113-
"product_cta": "Visualize product"
113+
"product_cta": "Visualize product",
114+
"available_pickup": "will be available for pickup at our store in",
115+
"pickedup": "Picked up at our store",
116+
"pickup": "is available for pickup at our store.",
117+
"and": "and"
114118
}

i18n/pt_br.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -112,5 +112,9 @@
112112
"link": "link",
113113
"stock_title": "O produto que deseja está em estoque",
114114
"promo_title": "O produto que deseja está em promoção",
115-
"product_cta": "Visualizar o produto"
115+
"product_cta": "Visualizar o produto",
116+
"available_pickup": "estará disponível para a retirada em nossa loja em",
117+
"pickedup": "Retirado em nossa loja",
118+
"pickup": "está disponível para a retirada em nossa loja.",
119+
"and": "e"
116120
}

views/authorized.ejs

+29-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<%
1+
<%
22
let orderLink
33
if (order.status_link) {
44
orderLink = order.status_link
@@ -106,7 +106,32 @@ if (order.status_link) {
106106
cellspacing="0" width="100%" style="table-layout: fixed;">
107107
<tbody>
108108
<tr>
109+
109110
<% order.shipping_lines.forEach(shipping => {%>
111+
112+
<% if (order.shipping_method_label == 'Retirar na loja') { %>
113+
<td style="padding:10px 50px 10px 50px;line-height:22px;text-align:inherit;"
114+
height="100%" valign="top" bgcolor="">
115+
<div style="text-align: center;">
116+
<font color="#333333">
117+
<%= i18n.order %>
118+
<a href="<%= orderLink %>">
119+
<%= order.number %>
120+
</a>
121+
122+
<%= i18n.available_pickup %>
123+
<strong>
124+
<%= shipping.delivery_time && shipping.delivery_time.days %>
125+
<% if (shipping.delivery_time && shipping.delivery_time.working_days) { %>
126+
<%= i18n.working_days %>
127+
<% } else { %>
128+
<%= i18n.days %>
129+
<% } %>
130+
</strong>
131+
</font>
132+
</div>
133+
</td>
134+
<% } else { %>
110135
<td style="padding:10px 50px 10px 50px;line-height:22px;text-align:inherit;"
111136
height="100%" valign="top" bgcolor="">
112137
<div style="text-align: center;">
@@ -125,7 +150,7 @@ if (order.status_link) {
125150
<%= i18n.days %>
126151
<% } %>
127152
</strong>
128-
153+
<%= i18n.and %>
129154
<%= i18n.delivering_in %>
130155
<strong>
131156
<%= shipping.delivery_time && shipping.delivery_time.days %>
@@ -157,6 +182,7 @@ if (order.status_link) {
157182
</font>
158183
</div>
159184
</td>
185+
<% } %>
160186
<% }) %>
161187
</tr>
162188
</tbody>
@@ -261,4 +287,4 @@ if (order.status_link) {
261287
262288
</body>
263289
264-
</html>
290+
</html>

views/delivered.ejs

+10-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<%
1+
<%
22
let orderLink
33
if (order.status_link) {
44
orderLink = order.status_link
@@ -98,7 +98,12 @@ if (order.status_link) {
9898
</div>
9999
100100
<br>
101-
101+
<% if (order.shipping_method_label == 'Retirar na loja') { %>
102+
<div style="text-align: center;">
103+
<font color="#333333">
104+
<%= i18n.pickedup %></font>
105+
</div>
106+
<% } else { %>
102107
<div style="text-align: center;">
103108
<font color="#333333"><%= shipping.to && shipping.to.street %>, nº
104109
<%= shipping.to.number %></font>
@@ -116,14 +121,14 @@ if (order.status_link) {
116121
117122
</td>
118123
119-
<% }) %>
124+
<% } }) %>
120125
121126
</tr>
122127
</tbody>
123128
</table>
124129
<% } %>
125130
126-
131+
127132
<table border="0" cellpadding="0" cellspacing="10" class="module"
128133
data-role="module-button" data-type="button" role="module"
129134
style="table-layout:fixed" width="100%">
@@ -221,4 +226,4 @@ if (order.status_link) {
221226
222227
</body>
223228
224-
</html>
229+
</html>

views/in_production.ejs

+44-16
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<%
1+
<%
22
let orderLink
33
if (order.status_link) {
44
orderLink = order.status_link
@@ -87,7 +87,32 @@ if (order.status_link) {
8787
cellspacing="0" width="100%" style="table-layout: fixed;">
8888
<tbody>
8989
<tr>
90+
9091
<% order.shipping_lines.forEach(shipping => {%>
92+
93+
<% if (order.shipping_method_label == 'Retirar na loja') { %>
94+
<td style="padding:10px 50px 10px 50px;line-height:22px;text-align:inherit;"
95+
height="100%" valign="top" bgcolor="">
96+
<div style="text-align: center;">
97+
<font color="#333333">
98+
<%= i18n.order %>
99+
<a href="<%= orderLink %>">
100+
<%= order.number %>
101+
</a>
102+
103+
<%= i18n.available_pickup %>
104+
<strong>
105+
<%= shipping.delivery_time && shipping.delivery_time.days %>
106+
<% if (shipping.delivery_time && shipping.delivery_time.working_days) { %>
107+
<%= i18n.working_days %>
108+
<% } else { %>
109+
<%= i18n.days %>
110+
<% } %>
111+
</strong>
112+
</font>
113+
</div>
114+
</td>
115+
<% } else { %>
91116
<td style="padding:10px 50px 10px 50px;line-height:22px;text-align:inherit;"
92117
height="100%" valign="top" bgcolor="">
93118
<div style="text-align: center;">
@@ -106,7 +131,7 @@ if (order.status_link) {
106131
<%= i18n.days %>
107132
<% } %>
108133
</strong>
109-
134+
<%= i18n.and %>
110135
<%= i18n.delivering_in %>
111136
<strong>
112137
<%= shipping.delivery_time && shipping.delivery_time.days %>
@@ -118,24 +143,27 @@ if (order.status_link) {
118143
</strong>
119144
120145
<%= i18n.on_following_address %>
121-
</font>
122-
</div>
123146
124-
<br>
147+
<br>
125148
126-
<div style="text-align: center;">
127-
<font color="#333333"><%= shipping.to && shipping.to.street %>, nº
128-
<%= shipping.to.number %></font>
129-
</div>
130-
<div style="text-align: center;">
131-
<font color="#333333"><%= shipping.to && shipping.to.city %>,
132-
<%= shipping.to && shipping.to.province_code %>, <%= shipping.to && shipping.to.zip %></font>
133-
</div>
134-
<div style="text-align: center;">
135-
<font color="#333333"><%= i18n.shipped_by %> <%= shipping.app && shipping.app.carrier %>
149+
<div style="text-align: center;">
150+
<font color="#333333"><%= shipping.to && shipping.to.street %>, nº
151+
<%= shipping.to.number %></font>
152+
</div>
153+
<div style="text-align: center;">
154+
<font color="#333333"><%= shipping.to && shipping.to.city %>,
155+
<%= shipping.to && shipping.to.province_code %>,
156+
<%= shipping.to && shipping.to.zip %></font>
157+
</div>
158+
<div style="text-align: center;">
159+
<font color="#333333"><%= i18n.shipped_by %>
160+
<%= shipping.app && shipping.app.carrier %>
161+
</font>
162+
</div>
136163
</font>
137164
</div>
138165
</td>
166+
<% } %>
139167
<% }) %>
140168
</tr>
141169
</tbody>
@@ -240,4 +268,4 @@ if (order.status_link) {
240268
241269
</body>
242270
243-
</html>
271+
</html>

0 commit comments

Comments
 (0)