From 0b8771ccf0c2a5df62133307a84db1d57008ceeb Mon Sep 17 00:00:00 2001 From: Lucas Hiago Date: Sat, 18 Apr 2020 10:43:43 -0300 Subject: [PATCH 1/8] Add connect with us footer to order cancelation email --- app/views/spree/order_mailer/cancel_email.html.haml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/spree/order_mailer/cancel_email.html.haml b/app/views/spree/order_mailer/cancel_email.html.haml index 47b577e79d..5d539b74d7 100755 --- a/app/views/spree/order_mailer/cancel_email.html.haml +++ b/app/views/spree/order_mailer/cancel_email.html.haml @@ -9,3 +9,4 @@ = t(".order_summary_canceled") = render 'order_summary' = render 'signoff' += render 'shared/mailers/social_and_contact' From 1c1200125e8e9563836bd37b1fd1e9fc050e85e2 Mon Sep 17 00:00:00 2001 From: Lucas Hiago Date: Sun, 19 Apr 2020 22:53:02 -0300 Subject: [PATCH 2/8] Add new greeting table in order cancel mail --- .../spree/order_mailer/cancel_email.html.haml | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/app/views/spree/order_mailer/cancel_email.html.haml b/app/views/spree/order_mailer/cancel_email.html.haml index 5d539b74d7..3a4b9e4608 100755 --- a/app/views/spree/order_mailer/cancel_email.html.haml +++ b/app/views/spree/order_mailer/cancel_email.html.haml @@ -1,8 +1,18 @@ -%h3 - = t(".customer_greeting", name: @order.bill_address.firstname) -%h4 - = t(".instructions") -%span.clear +%table.social.white-bg{:width => "100%"} + %tr + %td + %table.column{:align => "left"} + %tr + %td + %h3 + = t(".customer_greeting", name: @order.bill_address.firstname) + %h4 + = t(".instructions_html", distributor: @order.distributor.name ) + %img.float-left{:src => "#{@order.distributor.logo.url(:medium)}"}/ + %span.clear + +%p.callout + = t(".dont_cancel", email: @order.distributor.contact.email) %p   From 42012d648222af1f87fa68f8fe3e5fa2bebc98d7 Mon Sep 17 00:00:00 2001 From: Lucas Hiago Date: Sun, 19 Apr 2020 22:54:17 -0300 Subject: [PATCH 3/8] Add new order sumary in order cancel mail --- app/views/spree/order_mailer/cancel_email.html.haml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/views/spree/order_mailer/cancel_email.html.haml b/app/views/spree/order_mailer/cancel_email.html.haml index 3a4b9e4608..fdbda6e730 100755 --- a/app/views/spree/order_mailer/cancel_email.html.haml +++ b/app/views/spree/order_mailer/cancel_email.html.haml @@ -15,8 +15,11 @@ = t(".dont_cancel", email: @order.distributor.contact.email) %p   +%h4 + = t(".order_summary_canceled_html", number: @order.number) +%p + = t(".details") -= t(".order_summary_canceled") = render 'order_summary' = render 'signoff' = render 'shared/mailers/social_and_contact' From f72da4abe4ffcde729bf0347435389d589332e8a Mon Sep 17 00:00:00 2001 From: Lucas Hiago Date: Sun, 19 Apr 2020 22:54:35 -0300 Subject: [PATCH 4/8] Add refund message in order cancel mail --- app/views/spree/order_mailer/cancel_email.html.haml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/views/spree/order_mailer/cancel_email.html.haml b/app/views/spree/order_mailer/cancel_email.html.haml index fdbda6e730..9d01d8ec87 100755 --- a/app/views/spree/order_mailer/cancel_email.html.haml +++ b/app/views/spree/order_mailer/cancel_email.html.haml @@ -21,5 +21,12 @@ = t(".details") = render 'order_summary' + +%p + - if @order.paid? + = t(".paid_order", distributor: @order.distributor.name) + - else + = t(".unpaid_order") + = render 'signoff' = render 'shared/mailers/social_and_contact' From 5d286cb3496853aadd9ac6153eb34d1774c68869 Mon Sep 17 00:00:00 2001 From: Lucas Hiago Date: Sun, 19 Apr 2020 23:29:48 -0300 Subject: [PATCH 5/8] Add i18n of new symbols for order cancel mail --- config/locales/en.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index 01ba7cebd2..cd68a575ab 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -3437,9 +3437,14 @@ See the %{link} to find out more about %{sitename}'s features and to start using invalid: invalid order_mailer: cancel_email: - customer_greeting: "Hi %{name}!" - instructions: "Your order has been CANCELED. Please retain this cancellation information for your records." - order_summary_canceled: "Order Summary [CANCELED]" + customer_greeting: "Dear %{name}," + instructions_html: "Your order with %{distributor} has been CANCELED. Please retain this cancellation information for your records." + dont_cancel: "If you have changed your mind or don't wish to cancel this order please contact %{email}" + order_summary_canceled_html: "Order Summary #%{number} [CANCELED]" + details: "Here are the details of what you ordered:" + unpaid_order: "Your order was unpaid so no refund has been made" + paid_order: "Your order was paid so %{distributor} has refunded the full amount" + credit_order: "Your order was paid so your account has been credited" subject: "Cancellation of Order" confirm_email: subject: "Order Confirmation" From 0caa91d0576bf63cabecb531f86fdde610d03c77 Mon Sep 17 00:00:00 2001 From: Lucas Hiago Date: Sat, 2 May 2020 09:37:16 -0300 Subject: [PATCH 6/8] Remove second table of cancel email instructions style --- .../spree/order_mailer/cancel_email.html.haml | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/app/views/spree/order_mailer/cancel_email.html.haml b/app/views/spree/order_mailer/cancel_email.html.haml index 9d01d8ec87..e1b390996f 100755 --- a/app/views/spree/order_mailer/cancel_email.html.haml +++ b/app/views/spree/order_mailer/cancel_email.html.haml @@ -1,15 +1,12 @@ -%table.social.white-bg{:width => "100%"} - %tr - %td - %table.column{:align => "left"} - %tr - %td - %h3 - = t(".customer_greeting", name: @order.bill_address.firstname) - %h4 - = t(".instructions_html", distributor: @order.distributor.name ) - %img.float-left{:src => "#{@order.distributor.logo.url(:medium)}"}/ - %span.clear +%table.social.white-bg{width: "100%"} + %table.column{align: "left"} + %tr + %td + %h3 + = t(".customer_greeting", name: @order.bill_address.firstname) + %h4 + = t(".instructions_html", distributor: @order.distributor.name ) + %img.float-left{src: "#{@order.distributor.logo.url(:medium)}"} %p.callout = t(".dont_cancel", email: @order.distributor.contact.email) From 98cbe5762a2682245a7afafdb7660e9593c78f97 Mon Sep 17 00:00:00 2001 From: Lucas Hiago Date: Wed, 13 May 2020 21:13:29 -0300 Subject: [PATCH 7/8] Remove unused css property from image in cancel email --- app/views/spree/order_mailer/cancel_email.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/spree/order_mailer/cancel_email.html.haml b/app/views/spree/order_mailer/cancel_email.html.haml index e1b390996f..b708251420 100755 --- a/app/views/spree/order_mailer/cancel_email.html.haml +++ b/app/views/spree/order_mailer/cancel_email.html.haml @@ -6,7 +6,7 @@ = t(".customer_greeting", name: @order.bill_address.firstname) %h4 = t(".instructions_html", distributor: @order.distributor.name ) - %img.float-left{src: "#{@order.distributor.logo.url(:medium)}"} + %img{src: "#{@order.distributor.logo.url(:medium)}"} %p.callout = t(".dont_cancel", email: @order.distributor.contact.email) From ba30f55e70a41dcc5dba2ea5219a77aa87c56f93 Mon Sep 17 00:00:00 2001 From: Lucas Hiago Date: Mon, 18 May 2020 22:53:46 -0300 Subject: [PATCH 8/8] Add fullwidth for table selector --- app/assets/stylesheets/mail/email.css.scss | 4 ++++ app/views/spree/order_mailer/cancel_email.html.haml | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/mail/email.css.scss b/app/assets/stylesheets/mail/email.css.scss index bb1006c9ea..dee2738ead 100644 --- a/app/assets/stylesheets/mail/email.css.scss +++ b/app/assets/stylesheets/mail/email.css.scss @@ -68,6 +68,10 @@ table.social { background-color: white !important; border: 1px solid #ebebeb; } + + &.fullwidth { + width: 100%; + } } table.order-summary { diff --git a/app/views/spree/order_mailer/cancel_email.html.haml b/app/views/spree/order_mailer/cancel_email.html.haml index b708251420..0965d522b8 100755 --- a/app/views/spree/order_mailer/cancel_email.html.haml +++ b/app/views/spree/order_mailer/cancel_email.html.haml @@ -1,5 +1,5 @@ -%table.social.white-bg{width: "100%"} - %table.column{align: "left"} +%table.social.white-bg.fullwidth + %table.column %tr %td %h3