Merge pull request #5266 from luchiago/improve-order-cancellation-email

Improve order cancellation email
This commit is contained in:
Luis Ramos
2020-05-28 19:48:26 +01:00
committed by GitHub
3 changed files with 36 additions and 9 deletions

View File

@@ -68,6 +68,10 @@ table.social {
background-color: white !important;
border: 1px solid #ebebeb;
}
&.fullwidth {
width: 100%;
}
}
table.order-summary {

View File

@@ -1,11 +1,29 @@
%h3
= t(".customer_greeting", name: @order.bill_address.firstname)
%h4
= t(".instructions")
%span.clear
%table.social.white-bg.fullwidth
%table.column
%tr
%td
%h3
= t(".customer_greeting", name: @order.bill_address.firstname)
%h4
= t(".instructions_html", distributor: @order.distributor.name )
%img{src: "#{@order.distributor.logo.url(:medium)}"}
%p.callout
= 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'
%p
- if @order.paid?
= t(".paid_order", distributor: @order.distributor.name)
- else
= t(".unpaid_order")
= render 'signoff'
= render 'shared/mailers/social_and_contact'

View File

@@ -3434,9 +3434,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 <strong>%{distributor}</strong> 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: "<strong>Order Summary #%{number} [CANCELED]</strong>"
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"