Skip to content

Commit

Permalink
fix(templates): insert correct information about pickup
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusgnreis committed Apr 18, 2023
1 parent d177ae3 commit ca8ec57
Show file tree
Hide file tree
Showing 7 changed files with 99 additions and 37 deletions.
5 changes: 5 additions & 0 deletions i18n/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
"my_acc": "my account page",
"contact_us": "If you have any questions, please contact us.",
"posting_in": "Products will ship within",
"pickup_in": "will be available in up to",
"pickup_for": "for pick up",
"delivering_in": "Products will be delevered within",
"working_days": "working days",
"days": "days",
Expand All @@ -33,11 +35,14 @@
"on_following_address": "on the following address:",
"payment_title": "Thank you for purchasing!",
"payment_text": ", we are already separating your package that will soon be sent.",
"paid_text_picking": "We have received your payment and are working to get your product(s) cleared for pickup.",
"info": "Any update to the order will be notified by email, you can also track the progress through",
"shipped_title": "Your package is on the way.!",
"shipped_text": "your package is now with the carrier. To track the delivery progress, go to ",
"delivered_title": "your package was delivered!",
"delivered_text": "We hope you have enjoyed shopping with us and will soon visit our website again. The order was delivered to the address below:",
"delivered_pikup_title": "Your purchase is available for pickup!",
"delivered_pikup_text": "We hope you enjoyed the shopping experience and visit our website again soon. The order can now be picked up in our store",
"unauthorized_title": "your payment wasn't approved.",
"unauthorized_text": "You added products to your cart, but your product was not approved. Visit our store and try to buy it again.",
"voided_title": "your order was cancelled",
Expand Down
5 changes: 5 additions & 0 deletions i18n/pt_br.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
"my_acc": "minha conta.",
"contact_us": "Se houver alguma dúvida entre em contato conosco.",
"posting_in": "será enviado em até",
"pickup_in": "estará disponível em até",
"pickup_for": "para retirada",
"delivering_in": "será entregue em até",
"delivering_today": "será entregue ainda hoje",
"working_days": "dias úteis",
Expand All @@ -35,13 +37,16 @@
"on_following_address": "no endereço abaixo:",
"paid_title": "agradecemos a compra!",
"paid_text": "Recebemos seu pagamento e estamos trabalhando para que você receba seu(s) produto(s) o mais rápido possível",
"paid_text_picking": "Recebemos seu pagamento e estamos trabalhando para que seu(s) produto(s) sejam liberados para retirada.",
"paid_text_new": "Recebemos seu pagamento e estamos trabalhando para que você receba seu pedido o mais rápido possível",
"info": "Qualquer atualização no pedido será notificada por e-mail, você também pode acompanhar o andamento pela página",
"shipped_title": "seu pacote está a caminho!",
"shipped_text": "Seu pacote foi entregue para a transportadora e",
"shipped_text_pickup": "Seu pacote estará pronto para retirada em",
"shipped_title_pickup": "seu pacote está ficando pronto para retirada",
"delivered_title": "sua compra foi entregue!",
"delivered_pikup_title": "sua compra está disponível para retirada!",
"delivered_pikup_text": "Esperamos que tenha gostado da experiência de compra e em breve visite novamente nosso site. O pedido já pode ser retirada em nossa loja",
"delivered_text": "Esperamos que tenha gostado da experiência de compra e em breve visite novamente nosso site. O pedido foi entregue no endereço abaixo:",
"unauthorized_title": "não foi possível processar seu pagamento.",
"unauthorized_text": "Você adicionou itens ao seu carrinho de compras, mas o pagamento não foi aprovado. Visite seu pedido e tente comprar novamente.",
Expand Down
2 changes: 1 addition & 1 deletion scss/_functions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
$g: green($color);
$b: blue($color);

$yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000;
$yiq: calc((($r * 299) + ($g * 587) + ($b * 114)) / 1000);

@return if($yiq >= 150, $dark, $light);
}
65 changes: 36 additions & 29 deletions views/delivered.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,12 @@ if (order.status_link) {
<% } else { %>
<h2><span style="color:#333333;"><%= i18n.hello %>
<%= customer.name && customer.name.given_name %>,
<%= i18n.delivered_title %></span>
<% if (order.shipping_method_label && order.shipping_method_label.toLowerCase().includes("retir")) { %>
<%= i18n.delivered_pikup_title %>
<% } else { %>
<%= i18n.delivered_title %>
<% } %>
</span>
</h2>
<% } %>
</td>
Expand All @@ -93,17 +98,19 @@ if (order.status_link) {
<td style="padding:10px 50px 10px 50px;line-height:22px;text-align:inherit;"
height="100%" valign="top" bgcolor="">
<div style="text-align: center;">
<font color="#333333"> <%= i18n.delivered_text %> </font>
</div>
<br>
<% if (order.shipping_method_label && order.shipping_method_label.includes("Retirar")) { %>
<div style="text-align: center;">
<font color="#333333">
<%= i18n.pickedup %></font>
</div>
<% if (order.shipping_method_label && order.shipping_method_label.toLowerCase().includes("retir")) { %>
<div style="text-align: center;">
<font color="#333333"> <%= i18n.delivered_pikup_text %> </font>
</div>
<% if (shipping.delivery_instructions) { %>
<div style="text-align: center;">
<%= i18n.on_following_address %>
<br>
<font color="#333333">
<%= shipping.delivery_instructions %>
</font>
</div>
<% } %>
<% } else if (order.shipping_method_label && order.shipping_method_label.includes("mail")) { %>
<div style="text-align: center;">
Expand All @@ -119,23 +126,23 @@ if (order.status_link) {
<% } else { %>
<div style="text-align: center;">
<font color="#333333"><%= shipping.to && shipping.to.street %>, nº
<%= shipping.to.number %></font>
</div>
<div style="text-align: center;">
<font color="#333333"><%= shipping.to && shipping.to.city %>,
<%= shipping.to && shipping.to.province_code %>,
<%= shipping.to && shipping.to.zip %></font>
</div>
<div style="text-align: center;">
<font color="#333333"><%= i18n.shipped_by %>
<%= shipping.app && shipping.app.carrier %>
</font>
</div>
<div style="text-align: center;">
<font color="#333333"> <%= i18n.delivered_text %> </font>
</div>
<div style="text-align: center;">
<font color="#333333"><%= shipping.to && shipping.to.street %>, nº
<%= shipping.to.number %></font>
</div>
<div style="text-align: center;">
<font color="#333333"><%= shipping.to && shipping.to.city %>,
<%= shipping.to && shipping.to.province_code %>,
<%= shipping.to && shipping.to.zip %></font>
</div>
<div style="text-align: center;">
<font color="#333333"><%= i18n.shipped_by %>
<%= shipping.app && shipping.app.carrier %>
</font>
</div>
<% } }) %>
</td>
</tr>
Expand Down
18 changes: 18 additions & 0 deletions views/new_order.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,15 @@
<% } %>
</strong>
<%= i18n.after_payment %>
<% if (shipping.delivery_instructions) { %>
<%= i18n.on_following_address %>
<br>
<div style="text-align: center;">
<font color="#333333">
<%= shipping.delivery_instructions %>
</font>
</div>
<% } %>
<% } else if (order.shipping_method_label && order.shipping_method_label.toLowerCase().includes("mail")) { %>
<%= i18n.order %>
<a href="<%= (order.status_link) ? order.status_link : `${('https://' + store.domain || store.homepage)}/app/#/order/${order.number}/${order._id}` %>">#<%= order.number %></a>
Expand Down Expand Up @@ -570,6 +579,15 @@
<%= i18n.days %>
<% } %>
</strong>
<% if (shipping.delivery_instructions) { %>
<%= i18n.on_following_address %>
<br>
<div style="text-align: center;">
<font color="#333333">
<%= shipping.delivery_instructions %>
</font>
</div>
<% } %>
<% } else if (order.shipping_method_label && order.shipping_method_label.toLowerCase().includes("mail")) { %>
<%= i18n.order %>
<a href="<%= (order.status_link) ? order.status_link : `${('https://' + store.domain || store.homepage)}/app/#/order/${order.number}/${order._id}` %>">#<%= order.number %></a>
Expand Down
32 changes: 25 additions & 7 deletions views/paid.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,19 @@
<table class="module" role="module" data-type="text" border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed;">
<tbody><tr>
<td style="line-height:20px;text-align:center;" height="100%" valign="top" bgcolor="">
<div style="padding:0px 45px 20px 45px;text-align: center;"><font color="#333333">
<div style="text-align: center;"><font color="#333333"><%= i18n.paid_text %></font></div>
</font></div>
<div style="padding:0px 45px 20px 45px;text-align: center;">
<font color="#333333">
<div style="text-align: center;">
<font color="#333333">
<% if (order.shipping_method_label && order.shipping_method_label.toLowerCase().includes("retir")) { %>
<%= i18n.paid_text_picking %>
<% } else { %>
<%= i18n.paid_text %>
<% } %>
</font>
</div>
</font>
</div>
</td>
</tr>
</tbody>
Expand All @@ -73,9 +83,9 @@
<tbody>
<tr>
<% order.shipping_lines.forEach(shipping => {%>
<% order.shipping_lines.forEach(shipping => { %>
<% if (order.shipping_method_label && order.shipping_method_label.includes("etirar")) { %>
<% if (order.shipping_method_label && order.shipping_method_label.toLowerCase().includes("retir")) { %>
<td style="padding:10px 50px 10px 50px;line-height:22px;text-align:inherit;"
height="100%" valign="top" bgcolor="">
<div style="text-align: center;">
Expand All @@ -96,12 +106,20 @@
<%= i18n.days %>
<% } %>
</strong>
<% if (shipping.delivery_instructions) { %>
<%= i18n.on_following_address %>
<br>
<div style="text-align: center;">
<font color="#333333">
<%= shipping.delivery_instructions %>
</font>
</div>
<% } %>
</font>
</div>
</td>
<% } else if (order.shipping_method_label && order.shipping_method_label.includes("mail")) { %>
<td style="padding:10px 50px 10px 50px;line-height:22px;text-align:inherit;"
height="100%" valign="top" bgcolor="">
<div style="text-align: center;">
Expand All @@ -125,7 +143,7 @@
</div>
</td>
<% } else if (shipping.delivery_time.days == 0 ) { %>
<% } else if (shipping.delivery_time.days == 0 && !(order.shipping_method_label && order.shipping_method_label.includes("mail"))) { %>
<td style="padding:10px 50px 10px 50px;line-height:22px;text-align:inherit;"
height="100%" valign="top" bgcolor="">
<div style="text-align: center;">
Expand Down
9 changes: 9 additions & 0 deletions views/pending.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,15 @@
<% } %>
</strong>
<%= i18n.after_payment %>
<% if (shipping.delivery_instructions) { %>
<%= i18n.on_following_address %>
<br>
<div style="text-align: center;">
<font color="#333333">
<%= shipping.delivery_instructions %>
</font>
</div>
<% } %>
</font>
</div>
</td>
Expand Down

0 comments on commit ca8ec57

Please sign in to comment.