Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
More modern, nicer email templates
Damian Legawiec91ba8094ad38
diff --git a/spree/core/app/views/layouts/spree/base_mailer.html.erb b/spree/core/app/views/layouts/spree/base_mailer.html.erbindex 7410e17cb7..bcbedb6691 100644--- a/spree/core/app/views/layouts/spree/base_mailer.html.erb+++ b/spree/core/app/views/layouts/spree/base_mailer.html.erb@@ -4,43 +4,40 @@<meta name="viewport" content="width=device-width, initial-scale=1.0"/><meta name="x-apple-disable-message-reformatting"/><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>+ <meta name="color-scheme" content="light"/>+ <meta name="supported-color-schemes" content="light"/><%= render partial: 'spree/shared/base_mailer_stylesheets' %>+ <%# Per-email styles — templates add their own via `content_for :head` %>+ <%= yield :head %></head>- <body>- <table class="email-wrapper" width="100%" cellpadding="0" cellspacing="0" role="presentation">+ <body class="email-bg" style="margin: 0; padding: 0; -webkit-text-size-adjust: none;" bgcolor="#FFFFFF">+ <table class="email-wrapper" width="100%" cellpadding="0" cellspacing="0" role="presentation" bgcolor="#FFFFFF"><tr><td align="center"><table class="email-content" width="100%" cellpadding="0" cellspacing="0" role="presentation">- <%= render partial: 'spree/shared/base_mailer_header' %><!-- Email Body --><tr>- <td class="email-body" width="570" cellpadding="0" cellspacing="0">- <table class="email-body_inner" align="center" width="570" cellpadding="0" cellspacing="0" role="presentation">- <!-- Body content -->- <tbody>+ <td class="email-card" bgcolor="#F6F6F6">+ <%= render partial: 'spree/shared/base_mailer_header' %>+ <table width="100%" cellpadding="0" cellspacing="0" role="presentation"><tr>- <td class="content-cell">- <div class="f-fallback">- <%= yield %>- </div>+ <td class="content-cell f-fallback" align="left">+ <%= yield %></td></tr>- </tbody></table></td></tr>+ <!-- Email Footer --><tr>- <td>+ <td class="email-footer" align="center"><%= render partial: 'spree/shared/base_mailer_footer' %></td></tr></table></td></tr>- <tr>- <td height="60px"> </td>- </tr></table></body></html>diff --git a/spree/core/app/views/spree/export_mailer/export_done.html.erb b/spree/core/app/views/spree/export_mailer/export_done.html.erbindex a57a976a80..5d46243921 100644--- a/spree/core/app/views/spree/export_mailer/export_done.html.erb+++ b/spree/core/app/views/spree/export_mailer/export_done.html.erb@@ -1,15 +1,25 @@-<h1>- <%= Spree.t('export_mailer.greeting', user_name: @export.user&.first_name) %>-</h1>-<p>- <%= Spree.t('export_mailer.export_done.message') %>-</p>-<% if spree.respond_to?(:admin_export_url) %>- <p>- <%= link_to @export.attachment.filename, spree.admin_export_url(@export, host: @current_store.formatted_url) %>- </p>-<% end %>-<p>- <%= Spree.t('export_mailer.thanks') %><br />- <%= "#{current_store.name}" %>-</p>+<table class="hero" width="100%" cellpadding="0" cellspacing="0" role="presentation">+ <tr>+ <td align="center">+ <div class="hero_content f-fallback">+ <h1><%= Spree.t('export_mailer.greeting', user_name: @export.user&.first_name) %></h1>+ <p><%= Spree.t('export_mailer.export_done.message') %></p>+ <% if spree.respond_to?(:admin_export_url) %>+ <%= render 'spree/shared/mailer_button', url: spree.admin_export_url(@export, host: @current_store.formatted_url), label: @export.attachment.filename %>+ <% end %>+ </div>+ </td>+ </tr>+</table>++<table class="signoff" width="100%" cellpadding="0" cellspacing="0" role="presentation">+ <tr>+ <td align="center">+ <p class="f-fallback">+ <%= Spree.t('export_mailer.thanks') %>+ <br />+ <%= current_store.name %>+ </p>+ </td>+ </tr>+</table>diff --git a/spree/core/app/views/spree/invitation_mailer/invitation_accepted.html.erb b/spree/core/app/views/spree/invitation_mailer/invitation_accepted.html.erbindex 7c4a62e065..b473456c6b 100644--- a/spree/core/app/views/spree/invitation_mailer/invitation_accepted.html.erb+++ b/spree/core/app/views/spree/invitation_mailer/invitation_accepted.html.erb@@ -1,12 +1,22 @@-<h1>- <%= Spree.t('invitation_mailer.greeting', user_name: @invitation.inviter.first_name) %>-</h1>-<p>- <%= Spree.t('invitation_mailer.invitation_accepted.body', invitee_name: @invitation.invitee&.name, resource_name: @invitation.resource.name) %>-</p>--<p>- <%= Spree.t('invitation_mailer.thanks') %><br />- <%= current_store.name %>-</p>+<table class="hero" width="100%" cellpadding="0" cellspacing="0" role="presentation">+ <tr>+ <td align="center">+ <div class="hero_content f-fallback">+ <h1><%= Spree.t('invitation_mailer.greeting', user_name: @invitation.inviter.first_name) %></h1>+ <p><%= Spree.t('invitation_mailer.invitation_accepted.body', invitee_name: @invitation.invitee&.name, resource_name: @invitation.resource.name) %></p>+ </div>+ </td>+ </tr>+</table>+<table class="signoff" width="100%" cellpadding="0" cellspacing="0" role="presentation">+ <tr>+ <td align="center">+ <p class="f-fallback">+ <%= Spree.t('invitation_mailer.thanks') %>+ <br />+ <%= current_store.name %>+ </p>+ </td>+ </tr>+</table>diff --git a/spree/core/app/views/spree/invitation_mailer/invitation_email.html.erb b/spree/core/app/views/spree/invitation_mailer/invitation_email.html.erbindex 5750159893..2ff2d84cd7 100644--- a/spree/core/app/views/spree/invitation_mailer/invitation_email.html.erb+++ b/spree/core/app/views/spree/invitation_mailer/invitation_email.html.erb@@ -1,25 +1,30 @@-<h1>- <%= Spree.t('invitation_mailer.greeting', user_name: @invitation.invitee&.first_name || @invitation.email) %>-</h1>-<p>- <%= Spree.t('invitation_mailer.invitation_email.body', inviter_name: @invitation.inviter.name, resource_name: @invitation.resource.name) %>-</p>-<p>- <%= Spree.t('invitation_mailer.invitation_email.link_description') %>-</p>--<% if spree.respond_to?(:admin_invitation_url) %>- <p>- <%= link_to Spree.t(:accept), spree.admin_invitation_url(@invitation, token: @invitation.token, host: @invitation.store.formatted_url) %>- </p>-<% else %>- <p>- <%= link_to Spree.t(:accept), main_app.admin_invitation_acceptance_url(@invitation) %>- </p>-<% end %>--<p>- <%= Spree.t('invitation_mailer.thanks') %><br />- <%= current_store.name %>-</p>+<table class="hero" width="100%" cellpadding="0" cellspacing="0" role="presentation">+ <tr>+ <td align="center">+ <div class="hero_content f-fallback">+ <h1><%= Spree.t('invitation_mailer.invitation_email.subject', resource_name: @invitation.resource.name) %></h1>+ <p class="greeting"><%= Spree.t('invitation_mailer.greeting', user_name: @invitation.invitee&.first_name || @invitation.email) %></p>+ <p><%= Spree.t('invitation_mailer.invitation_email.body', inviter_name: @invitation.inviter.name, resource_name: @invitation.resource.name) %></p>+ <p><%= Spree.t('invitation_mailer.invitation_email.link_description') %></p>+ <% accept_url = if spree.respond_to?(:admin_invitation_url)+ spree.admin_invitation_url(@invitation, token: @invitation.token, host: @invitation.store.formatted_url)+ else+ main_app.admin_invitation_acceptance_url(@invitation)+ end %>+ <%= render 'spree/shared/mailer_button', url: accept_url, label: Spree.t(:accept) %>+ </div>+ </td>+ </tr>+</table>+<table class="signoff" width="100%" cellpadding="0" cellspacing="0" role="presentation">+ <tr>+ <td align="center">+ <p class="f-fallback">+ <%= Spree.t('invitation_mailer.thanks') %>+ <br />+ <%= current_store.name %>+ </p>+ </td>+ </tr>+</table>diff --git a/spree/core/app/views/spree/report_mailer/report_done.html.erb b/spree/core/app/views/spree/report_mailer/report_done.html.erbindex 4cb2b9f462..5a37cf6aad 100644--- a/spree/core/app/views/spree/report_mailer/report_done.html.erb+++ b/spree/core/app/views/spree/report_mailer/report_done.html.erb@@ -1,15 +1,25 @@-<h1>- <%= Spree.t('report_mailer.greeting', user_name: @report.user&.first_name) %>-</h1>-<p>- <%= Spree.t('report_mailer.report_done.message') %>-</p>-<% if spree.respond_to?(:admin_report_url) %>- <p>- <%= link_to @report.attachment.filename, spree.admin_report_url(@report, host: @current_store.formatted_url) %>- </p>-<% end %>-<p>- <%= Spree.t('report_mailer.thanks') %><br />- <%= "#{current_store.name}" %>-</p>+<table class="hero" width="100%" cellpadding="0" cellspacing="0" role="presentation">+ <tr>+ <td align="center">+ <div class="hero_content f-fallback">+ <h1><%= Spree.t('report_mailer.greeting', user_name: @report.user&.first_name) %></h1>+ <p><%= Spree.t('report_mailer.report_done.message') %></p>+ <% if spree.respond_to?(:admin_report_url) %>+ <%= render 'spree/shared/mailer_button', url: spree.admin_report_url(@report, host: @current_store.formatted_url), label: @report.attachment.filename %>+ <% end %>+ </div>+ </td>+ </tr>+</table>++<table class="signoff" width="100%" cellpadding="0" cellspacing="0" role="presentation">+ <tr>+ <td align="center">+ <p class="f-fallback">+ <%= Spree.t('report_mailer.thanks') %>+ <br />+ <%= current_store.name %>+ </p>+ </td>+ </tr>+</table>diff --git a/spree/core/app/views/spree/shared/_base_mailer_footer.html.erb b/spree/core/app/views/spree/shared/_base_mailer_footer.html.erbindex 1d9d95db61..4b29c0e84c 100644--- a/spree/core/app/views/spree/shared/_base_mailer_footer.html.erb+++ b/spree/core/app/views/spree/shared/_base_mailer_footer.html.erb@@ -1,12 +1,19 @@-<!-- You can override this template to design your own footer.-<table class="email-footer" align="center" width="570" cellpadding="0" cellspacing="0" role="presentation">+<!-- You can override this template to design your own footer. -->+<table width="100%" cellpadding="0" cellspacing="0" role="presentation"><tr>- <td class="content-cell" align="center">- <p class="f-fallback sub align-center">- <a href="#">Terms</a> | <a href="#">Privacy</a> |- <a href="#">Unsubscribe</a>- </p>+ <td align="center">+ <div class="footer_content f-fallback">+ <p class="footer_brand">+ <%= link_to current_store.name, current_store.storefront_url %>+ </p>+ <% if current_store.address.present? %>+ <p class="footer_meta"><%= current_store.address %></p>+ <% end %>+ <% if current_store.customer_support_email.present? %>+ <p class="footer_meta"><%= mail_to current_store.customer_support_email %></p>+ <% end %>+ <p class="footer_note">© <%= Time.current.year %> <%= current_store.name %></p>+ </div></td></tr></table>--->diff --git a/spree/core/app/views/spree/shared/_base_mailer_header.html.erb b/spree/core/app/views/spree/shared/_base_mailer_header.html.erbindex e1734defd9..614202835a 100644--- a/spree/core/app/views/spree/shared/_base_mailer_header.html.erb+++ b/spree/core/app/views/spree/shared/_base_mailer_header.html.erb@@ -1,6 +1,8 @@<!-- You can override this template to design your own header. -->-<tr>- <td class="email-masthead">- <%= render 'spree/shared/mailer_logo', logo: current_store.mailer_logo.attached? ? current_store.mailer_logo : current_store.logo %>- </td>-</tr>+<table width="100%" cellpadding="0" cellspacing="0" role="presentation">+ <tr>+ <td class="email-masthead" align="center">+ <%= render 'spree/shared/mailer_logo', logo: current_store.mailer_logo.attached? ? current_store.mailer_logo : current_store.logo, height: 32 %>+ </td>+ </tr>+</table>diff --git a/spree/core/app/views/spree/shared/_base_mailer_stylesheets.html.erb b/spree/core/app/views/spree/shared/_base_mailer_stylesheets.html.erbindex 080cf1c515..5ce4d3fb3d 100644--- a/spree/core/app/views/spree/shared/_base_mailer_stylesheets.html.erb+++ b/spree/core/app/views/spree/shared/_base_mailer_stylesheets.html.erb@@ -1,17 +1,69 @@<style type="text/css" rel="stylesheet" media="all">- /* Base ------------------------------ */+ /* Fonts ------------------------------ */+ /* Same files the react-email Studio templates load; Gmail strips these and falls back to Arial. */++ @font-face {+ font-family: "Geist";+ font-style: normal;+ font-weight: 500;+ src: url("https://fonts.gstatic.com/s/geist/v4/gyByhwUxId8gMEwcGFU.woff2") format("woff2");+ }++ @font-face {+ font-family: "Geist";+ font-style: normal;+ font-weight: 600;+ src: url("https://fonts.gstatic.com/s/geist/v4/gyByhwUxId8gMEwcGFU.woff2") format("woff2");+ }++ @font-face {+ font-family: "Geist";+ font-style: normal;+ font-weight: 700;+ src: url("https://fonts.gstatic.com/s/geist/v4/gyByhwUxId8gMEwcGFU.woff2") format("woff2");+ }++ @font-face {+ font-family: "Inter";+ font-style: normal;+ font-weight: 400;+ src: url("https://fonts.gstatic.com/s/inter/v20/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuOKfMZg.ttf") format("truetype");+ }++ @font-face {+ font-family: "Inter";+ font-style: normal;+ font-weight: 450;+ src: url("https://fonts.gstatic.com/s/inter/v20/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuOKfMZg.ttf") format("truetype");+ }++ @font-face {+ font-family: "Inter";+ font-style: normal;+ font-weight: 500;+ src: url("https://fonts.gstatic.com/s/inter/v20/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuI6fMZg.ttf") format("truetype");+ }++ @font-face {+ font-family: "Inter";+ font-style: normal;+ font-weight: 600;+ src: url("https://fonts.gstatic.com/s/inter/v20/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuGKYMZg.ttf") format("truetype");+ }- @import url("https://fonts.googleapis.com/css?family=Nunito+Sans:400,700&display=swap");+ /* Base ------------------------------ */body {width: 100% !important;height: 100%;margin: 0;-webkit-text-size-adjust: none;+ background-color: #FFFFFF;+ color: #726A6A;}a {- color: #3869D4;+ color: #332C2C;}a img {@@ -39,49 +91,73 @@body,td,th {- font-family: "Nunito Sans", Helvetica, Arial, sans-serif;+ font-family: "Inter", Helvetica, Arial, sans-serif;}h1 {- margin-top: 0;- color: #333333;- font-size: 22px;- font-weight: bold;- text-align: left;+ margin: 0 0 24px;+ font-family: "Geist", "Inter", Helvetica, Arial, sans-serif;+ color: #332C2C;+ font-size: 40px;+ line-height: 1.2;+ letter-spacing: -0.8px;+ font-weight: 700;+ text-align: center;}h2 {- margin-top: 0;- color: #333333;- font-size: 16px;- font-weight: bold;- text-align: left;+ margin: 0 0 16px;+ font-family: "Geist", "Inter", Helvetica, Arial, sans-serif;+ color: #332C2C;+ font-size: 22px;+ line-height: 1.4;+ letter-spacing: -0.18px;+ font-weight: 500;+ text-align: center;}h3 {- margin-top: 0;- color: #333333;- font-size: 14px;- font-weight: bold;+ margin: 0 0 16px;+ font-family: "Geist", "Inter", Helvetica, Arial, sans-serif;+ color: #A2A9AA;+ font-size: 16px;+ line-height: 1.5;+ letter-spacing: -0.16px;+ font-weight: 500;text-align: left;}td,th {- font-size: 16px;+ font-size: 14px;}p,ul,ol,blockquote {- margin: .4em 0 1.1875em;- font-size: 16px;- line-height: 1.625;+ margin: 0 0 16px;+ font-size: 14px;+ line-height: 1.6;+ letter-spacing: -0.042px;+ font-weight: 450;+ color: #726A6A;}p.sub {font-size: 13px;+ color: #A2A9AA;+ }++ p.sub a {+ color: #726A6A;+ word-break: break-all;+ }++ p.strong {+ margin: 0;+ font-weight: 500;+ color: #332C2C;}/* Utilities ------------------------------ */@@ -101,34 +177,30 @@/* Buttons ------------------------------ */.button {- background-color: #3869D4;- border-top: 10px solid #3869D4;- border-right: 18px solid #3869D4;- border-bottom: 10px solid #3869D4;- border-left: 18px solid #3869D4;display: inline-block;- color: #FFF !important;+ background-color: #FFFFFF;+ border: 1px solid #E8E9E9;+ border-radius: 8px;+ padding: 12px 20px;+ font-size: 15px;+ line-height: 1.6;+ font-weight: 500;+ color: #1F2222 !important;text-decoration: none;- border-radius: 3px;- box-shadow: 0 2px 3px rgba(0, 0, 0, 0.16);-webkit-text-size-adjust: none;box-sizing: border-box;}.button--green {background-color: #22BC66;- border-top: 10px solid #22BC66;- border-right: 18px solid #22BC66;- border-bottom: 10px solid #22BC66;- border-left: 18px solid #22BC66;+ border-color: #22BC66;+ color: #FFFFFF !important;}.button--red {background-color: #FF6136;- border-top: 10px solid #FF6136;- border-right: 18px solid #FF6136;- border-bottom: 10px solid #FF6136;- border-left: 18px solid #FF6136;+ border-color: #FF6136;+ color: #FFFFFF !important;}@media only screen and (max-width: 500px) {@@ -138,317 +210,204 @@}}- /* Attribute list ------------------------------ */+ /* Hero ------------------------------ */- .attributes {- margin: 0 0 21px;- }-- .attributes_content {- background-color: #F4F4F7;- padding: 16px;+ .hero {+ width: 100%;+ text-align: center;}- .attributes_item {- padding: 0;+ .hero_content {+ max-width: 420px;+ margin: 0 auto;}- /* Related Items ------------------------------ */-- .related {- width: 100%;+ .hero h1 {margin: 0;- padding: 25px 0 0 0;- -premailer-width: 100%;- -premailer-cellpadding: 0;- -premailer-cellspacing: 0;}- .related_item {- padding: 10px 0;- color: #CBCCCF;- font-size: 15px;- line-height: 18px;+ .hero p {+ margin: 12px 0 0;}- .related_item-title {- display: block;- margin: .5em 0 0;+ .hero .greeting {+ margin: 24px 0 0;+ font-size: 15px;+ font-weight: 500;+ color: #332C2C;}- .related_item-thumb {- display: block;- padding-bottom: 10px;+ .hero .sub {+ margin: 24px 0 0;}- .related_heading {- border-top: 1px solid #CBCCCF;- text-align: center;- padding: 25px 0 10px;+ .hero .sub + .sub {+ margin: 16px 0 0;}- /* Discount Code ------------------------------ */+ /* Sections ------------------------------ */- .discount {+ .section {width: 100%;- margin: 0;- padding: 24px;- -premailer-width: 100%;- -premailer-cellpadding: 0;- -premailer-cellspacing: 0;- background-color: #F4F4F7;- border: 2px dashed #CBCCCF;+ margin: 48px 0 0;+ text-align: left;}- .discount_heading {- text-align: center;+ .section .sub {+ margin: 16px 0 0;}- .discount_body {+ .signoff {+ width: 100%;+ margin: 40px 0 0;text-align: center;- font-size: 15px;- }-- /* Social Icons ------------------------------ */-- .social {- width: auto;}- .social td {- padding: 0;- width: auto;- }-- .social_icon {- height: 20px;- margin: 0 8px 10px 8px;- padding: 0;+ .signoff p {+ margin: 0;}- /* Data table ------------------------------ */+ /* Structure ------------------------------ */- .purchase {+ .email-wrapper {width: 100%;margin: 0;- -premailer-width: 100%;- -premailer-cellpadding: 0;- -premailer-cellspacing: 0;+ padding: 0;+ background-color: #FFFFFF;}- .purchase_content {+ .email-content {width: 100%;- margin: 0;- -premailer-width: 100%;- -premailer-cellpadding: 0;- -premailer-cellspacing: 0;- }-- .purchase_item {- padding: 10px 4px;- color: #51545E;- font-size: 15px;- line-height: 18px;+ max-width: 640px;+ margin: 0 auto;+ padding: 0;}- .purchase_image {- padding: 5px;- width: 100px;+ /* Masthead ----------------------- */- img {- width: 100px;- }+ .email-masthead {+ padding: 0 0 32px;+ text-align: center;}- .purchase_item p {- margin: 0;- padding: 0.1em 0;+ .email-masthead_name {+ font-size: 16px;+ font-weight: 600;+ color: #332C2C;+ text-decoration: none;}- .purchase_item--additional {- font-size: 12px;- }+ /* Body ------------------------------ */- .purchase_heading {- padding-bottom: 8px;- border-bottom: 1px solid #EAEAEC;+ .email-card {+ background-color: #F6F6F6;+ padding: 56px 24px;}- .purchase_heading p {- margin: 0;- color: #85878E;- font-size: 12px;+ .email-footer {+ padding: 64px 24px;+ text-align: center;}- .purchase_footer {- padding-top: 15px;- border-top: 1px solid #EAEAEC;+ .email-footer p {+ color: #726A6A;}- .purchase_total {- margin: 0;- text-align: right;- font-weight: bold;- color: #333333;+ .footer_content {+ max-width: 320px;+ margin: 0 auto;}- .purchase_total--name {+ .footer_brand {margin: 0;- text-align: right;- color: #333333;- }-- .purchase_total--label {- padding: 0 15px 0 0;+ font-size: 13px;+ line-height: 1.5;+ letter-spacing: -0.13px;}- .purchase_total-col {- vertical-align: bottom;+ .footer_brand a {+ color: #726A6A;+ font-weight: 500;+ text-decoration: none;}- body {- background-color: #F2F4F6;- color: #51545E;+ .footer_meta {+ margin: 12px 0 0;+ font-size: 11px;+ line-height: 1.5;+ letter-spacing: -0.11px;}- p {- color: #51545E;+ .footer_meta a {+ color: #726A6A;}- .email-wrapper {- width: 100%;- margin: 0;- padding: 0;- -premailer-width: 100%;- -premailer-cellpadding: 0;- -premailer-cellspacing: 0;- background-color: #F2F4F6;+ .footer_note {+ margin: 20px 0 0;+ font-size: 11px;+ line-height: 1.5;+ letter-spacing: -0.11px;+ color: #A2A9AA;}- .email-content {+ .body-action {width: 100%;- margin: 0;+ margin: 32px auto 0;padding: 0;- -premailer-width: 100%;- -premailer-cellpadding: 0;- -premailer-cellspacing: 0;- }-- /* Masthead ----------------------- */-- .email-masthead {- padding: 25px 0;text-align: center;}- .email-masthead_logo {- width: 94px;- }-- .email-masthead_name {- font-size: 16px;- font-weight: bold;- color: #A8AAAF;- text-decoration: none;- text-shadow: 0 1px 0 white;+ .body-sub {+ margin-top: 24px;+ padding-top: 24px;+ border-top: 1px solid #F0F0F0;}- /* Body ------------------------------ */+ /* Data table (legacy class hooks) ------------------------------ */- .email-body {+ .purchase,+ .purchase_content {width: 100%;margin: 0;- padding: 0;- -premailer-width: 100%;- -premailer-cellpadding: 0;- -premailer-cellspacing: 0;- }-- .email-body_inner {- width: 570px;- margin: 0 auto;- padding: 0;- -premailer-width: 570px;- -premailer-cellpadding: 0;- -premailer-cellspacing: 0;- background-color: #FFFFFF;- }-- .email-footer {- width: 570px;- margin: 0 auto;- padding: 0;- -premailer-width: 570px;- -premailer-cellpadding: 0;- -premailer-cellspacing: 0;- text-align: center;}- .email-footer p {- color: #A8AAAF;+ .purchase_item {+ padding: 10px 4px;+ color: #726A6A;+ font-size: 14px;+ line-height: 1.6;}- .body-action {- width: 100%;- margin: 30px auto;- padding: 0;- -premailer-width: 100%;- -premailer-cellpadding: 0;- -premailer-cellspacing: 0;- text-align: center;+ .purchase_item--additional {+ font-size: 13px;+ color: #A2A9AA;}- .body-sub {- margin-top: 25px;- padding-top: 25px;- border-top: 1px solid #EAEAEC;+ .purchase_total {+ margin: 0;+ text-align: right;+ font-weight: 500;+ color: #332C2C;}- .content-cell {- padding: 40px;+ .purchase_total--name {+ margin: 0;+ text-align: right;+ color: #726A6A;}- /*Media Queries ------------------------------ */+ /* Media Queries ------------------------------ */@media only screen and (max-width: 600px) {- .email-body_inner,- .email-footer {- width: 100% !important;- }- .content-cell {- padding: 40px 15px !important;+ .email-card {+ padding: 40px 16px !important;}- }-- @media (prefers-color-scheme: dark) {- body,- .email-body,- .email-body_inner,- .email-content,- .email-wrapper,- .email-masthead,.email-footer {- background-color: #333333 !important;- color: #FFF !important;+ padding: 48px 16px !important;}-- p,- ul,- ol,- blockquote,- h1,- h2,- h3 {- color: #FFF !important;- }-- .attributes_content,- .discount {- background-color: #222 !important;- }-- .email-masthead_name {- text-shadow: none !important;+ h1 {+ font-size: 32px !important;+ letter-spacing: -0.64px !important;}}</style>diff --git a/spree/core/app/views/spree/shared/_mailer_button.html.erb b/spree/core/app/views/spree/shared/_mailer_button.html.erbnew file mode 100644index 0000000000..df7766befb--- /dev/null+++ b/spree/core/app/views/spree/shared/_mailer_button.html.erb@@ -0,0 +1,10 @@+<% button_class = local_assigns.fetch(:button_class, nil) %>+<table class="body-action" align="center" width="100%" cellpadding="0" cellspacing="0" role="presentation">+ <tr>+ <td align="center">+ <a href="<%= url %>" class="f-fallback button <%= button_class %>" target="_blank">+ <%= label %>+ </a>+ </td>+ </tr>+</table>diff --git a/spree/core/app/views/spree/shared/_purchased_items_styles.html.erb b/spree/core/app/views/spree/shared/_purchased_items_styles.html.erbnew file mode 100644index 0000000000..1559963308--- /dev/null+++ b/spree/core/app/views/spree/shared/_purchased_items_styles.html.erb@@ -0,0 +1,112 @@+<%# Per-email stylesheet for the line item tiles + order summary rows.+ Render it once at the top of any mailer template that uses these components —+ it lands in the layout <head> via `content_for :head`. %>+<% content_for :head do %>+ <style type="text/css" rel="stylesheet" media="all">+ /* Line item tiles ------------------------------ */++ .item {+ width: 100%;+ background-color: #F0F0F0;+ border-radius: 16px;+ margin: 0 0 8px;+ }++ .item .item_image {+ padding: 8px;+ width: 96px;+ }++ .item .item_thumb {+ display: block;+ width: 80px;+ height: auto;+ border-radius: 12px;+ }++ .item .item_info {+ padding: 8px 16px 8px 8px;+ }++ .item .item_name {+ display: inline-block;+ font-size: 15px;+ line-height: 1.5;+ font-weight: 500;+ color: #332C2C;+ text-decoration: none;+ }++ .item .item_meta {+ margin: 2px 0 0;+ font-size: 13px;+ line-height: 1.5;+ color: #A2A9AA;+ }++ .item .item_amount {+ padding: 8px 16px 8px 8px;+ text-align: right;+ white-space: nowrap;+ }++ .item .item_qty {+ margin: 0;+ font-size: 13px;+ line-height: 1.5;+ color: #A2A9AA;+ }++ .item .item_price {+ margin: 2px 0 0;+ font-size: 15px;+ line-height: 1.5;+ font-weight: 500;+ color: #332C2C;+ }++ /* Summary rows ------------------------------ */++ .summary {+ width: 100%;+ margin: 16px 0 0;+ }++ .summary td {+ padding: 6px 0;+ font-size: 14px;+ line-height: 1.6;+ font-weight: 450;+ color: #726A6A;+ }++ .summary .summary_value {+ font-size: 15px;+ font-weight: 500;+ text-align: right;+ white-space: nowrap;+ }++ .summary .summary_sub {+ display: block;+ font-size: 13px;+ line-height: 1.5;+ color: #A2A9AA;+ }++ .summary .summary_strong {+ color: #332C2C;+ }++ .summary_total td {+ padding: 14px 0 0;+ border-top: 1px solid #E8E9E9;+ font-weight: 500;+ color: #332C2C;+ }++ .summary_total .summary_value {+ font-weight: 600;+ }+ </style>+<% end %>diff --git a/spree/core/app/views/spree/webhook_mailer/endpoint_disabled.html.erb b/spree/core/app/views/spree/webhook_mailer/endpoint_disabled.html.erbindex c8c93280a8..8a9b1d2e4e 100644--- a/spree/core/app/views/spree/webhook_mailer/endpoint_disabled.html.erb+++ b/spree/core/app/views/spree/webhook_mailer/endpoint_disabled.html.erb@@ -1,26 +1,57 @@-<h1><%= Spree.t('webhook_mailer.endpoint_disabled.heading') %></h1>+<%= render 'spree/shared/purchased_items_styles' %>-<p><%= Spree.t('webhook_mailer.endpoint_disabled.message', endpoint_name: @endpoint.name || @endpoint.url) %></p>--<table role="presentation" style="width: 100%; border-collapse: collapse; margin: 20px 0;">+<table class="hero" width="100%" cellpadding="0" cellspacing="0" role="presentation"><tr>- <td style="padding: 8px 0; color: #6b7280;"><strong><%= Spree.t('webhook_mailer.endpoint_disabled.url_label') %></strong></td>- <td style="padding: 8px 0;"><%= @endpoint.url %></td>+ <td align="center">+ <div class="hero_content f-fallback">+ <h1><%= Spree.t('webhook_mailer.endpoint_disabled.heading') %></h1>+ <p><%= Spree.t('webhook_mailer.endpoint_disabled.message', endpoint_name: @endpoint.name || @endpoint.url) %></p>+ </div>+ </td></tr>- <% if @endpoint.name.present? %>+</table>++<table class="section summary" width="100%" cellpadding="0" cellspacing="0" role="presentation"><tr>- <td style="padding: 8px 0; color: #6b7280;"><strong><%= Spree.t('webhook_mailer.endpoint_disabled.name_label') %></strong></td>- <td style="padding: 8px 0;"><%= @endpoint.name %></td>+ <td valign="top">+ <span class="f-fallback"><%= Spree.t('webhook_mailer.endpoint_disabled.url_label') %></span>+ </td>+ <td class="summary_value summary_strong" align="right" valign="top">+ <span class="f-fallback"><%= @endpoint.url %></span>+ </td></tr>+ <% if @endpoint.name.present? %>+ <tr>+ <td valign="top">+ <span class="f-fallback"><%= Spree.t('webhook_mailer.endpoint_disabled.name_label') %></span>+ </td>+ <td class="summary_value summary_strong" align="right" valign="top">+ <span class="f-fallback"><%= @endpoint.name %></span>+ </td>+ </tr><% end %><tr>- <td style="padding: 8px 0; color: #6b7280;"><strong><%= Spree.t('webhook_mailer.endpoint_disabled.reason_label') %></strong></td>- <td style="padding: 8px 0;"><%= @endpoint.disabled_reason %></td>+ <td valign="top">+ <span class="f-fallback"><%= Spree.t('webhook_mailer.endpoint_disabled.reason_label') %></span>+ </td>+ <td class="summary_value summary_strong" align="right" valign="top">+ <span class="f-fallback"><%= @endpoint.disabled_reason %></span>+ </td></tr><tr>- <td style="padding: 8px 0; color: #6b7280;"><strong><%= Spree.t('webhook_mailer.endpoint_disabled.disabled_at_label') %></strong></td>- <td style="padding: 8px 0;"><%= @endpoint.disabled_at&.strftime('%Y-%m-%d %H:%M %Z') %></td>+ <td valign="top">+ <span class="f-fallback"><%= Spree.t('webhook_mailer.endpoint_disabled.disabled_at_label') %></span>+ </td>+ <td class="summary_value summary_strong" align="right" valign="top">+ <span class="f-fallback"><%= @endpoint.disabled_at&.strftime('%Y-%m-%d %H:%M %Z') %></span>+ </td></tr></table>-<p><%= Spree.t('webhook_mailer.endpoint_disabled.instructions') %></p>+<table class="signoff" width="100%" cellpadding="0" cellspacing="0" role="presentation">+ <tr>+ <td align="center">+ <p class="f-fallback"><%= Spree.t('webhook_mailer.endpoint_disabled.instructions') %></p>+ </td>+ </tr>+</table>diff --git a/spree/emails/app/views/spree/customer_mailer/password_reset_email.html.erb b/spree/emails/app/views/spree/customer_mailer/password_reset_email.html.erbindex 8652bbf6b8..1da494f7ee 100644--- a/spree/emails/app/views/spree/customer_mailer/password_reset_email.html.erb+++ b/spree/emails/app/views/spree/customer_mailer/password_reset_email.html.erb@@ -1,26 +1,24 @@-<h1>- <%= Spree.t('customer_mailer.password_reset_email.greeting', name: @user.first_name.presence || @user.email) %>-</h1>-<p>- <%= Spree.t('customer_mailer.password_reset_email.instructions') %>-</p>-<% if @reset_url %>- <table class="body-action" align="center" width="100%" cellpadding="0" cellspacing="0" role="presentation">- <tr>- <td align="center">- <a href="<%= @reset_url %>" class="button" target="_blank">- <%= Spree.t('customer_mailer.password_reset_email.action') %>- </a>- </td>- </tr>- </table>-<% end %>-<p>- <%= Spree.t('customer_mailer.password_reset_email.expiry_notice') %>-</p>-<p>- <%= Spree.t('customer_mailer.password_reset_email.ignore_notice') %>-</p>-<p>- <%= Spree.t('order_mailer.store_team', store_name: current_store.name) %>-</p>+<table class="hero" width="100%" cellpadding="0" cellspacing="0" role="presentation">+ <tr>+ <td align="center">+ <div class="hero_content f-fallback">+ <h1><%= Spree.t('customer_mailer.password_reset_email.action') %></h1>+ <p class="greeting"><%= Spree.t('customer_mailer.password_reset_email.greeting', name: @user.first_name.presence || @user.email) %></p>+ <p><%= Spree.t('customer_mailer.password_reset_email.instructions') %></p>+ <% if @reset_url %>+ <%= render 'spree/shared/mailer_button', url: @reset_url, label: Spree.t('customer_mailer.password_reset_email.action') %>+ <% end %>+ <p class="sub"><%= Spree.t('customer_mailer.password_reset_email.expiry_notice') %></p>+ <p class="sub"><%= Spree.t('customer_mailer.password_reset_email.ignore_notice') %></p>+ </div>+ </td>+ </tr>+</table>++<table class="signoff" width="100%" cellpadding="0" cellspacing="0" role="presentation">+ <tr>+ <td align="center">+ <p class="f-fallback"><%= Spree.t('order_mailer.store_team', store_name: current_store.name) %></p>+ </td>+ </tr>+</table>diff --git a/spree/emails/app/views/spree/newsletter_mailer/email_confirmation.html.erb b/spree/emails/app/views/spree/newsletter_mailer/email_confirmation.html.erbindex 66b7bbba20..624139234b 100644--- a/spree/emails/app/views/spree/newsletter_mailer/email_confirmation.html.erb+++ b/spree/emails/app/views/spree/newsletter_mailer/email_confirmation.html.erb@@ -1,23 +1,30 @@-<h1><%= Spree.t('newsletter_mailer.email_confirmation.dear_customer') %></h1>+<table class="hero" width="100%" cellpadding="0" cellspacing="0" role="presentation">+ <tr>+ <td align="center">+ <div class="hero_content f-fallback">+ <h1><%= Spree.t('newsletter_mailer.email_confirmation.subject') %></h1>+ <p class="greeting"><%= Spree.t('newsletter_mailer.email_confirmation.dear_customer') %></p>+ <p><%= Spree.t('newsletter_mailer.email_confirmation.instructions') %></p>+ <%= render 'spree/shared/mailer_button', url: @confirm_email_url, label: Spree.t('newsletter_mailer.email_confirmation.verify_email_address_link') %>+ <p class="sub">+ <%= Spree.t('newsletter_mailer.email_confirmation.message_copy_link') %>+ <br>+ <%= link_to @confirm_email_url, @confirm_email_url %>+ </p>+ <p class="sub"><%= Spree.t('newsletter_mailer.email_confirmation.ignore_disclaimer') %></p>+ </div>+ </td>+ </tr>+</table>-<p><%= Spree.t('newsletter_mailer.email_confirmation.instructions') %></p>--<p class="align-center">-<%= link_to Spree.t('newsletter_mailer.email_confirmation.verify_email_address_link'), @confirm_email_url, class: 'button' %>-</p>--<p>- <%= Spree.t('newsletter_mailer.email_confirmation.message_copy_link') %>- <br>- <span style="word-break: break-all;">- <%= link_to @confirm_email_url, @confirm_email_url %>- </span>-</p>--<p><%= Spree.t('newsletter_mailer.email_confirmation.ignore_disclaimer') %></p>--<p>- <%= Spree.t('newsletter_mailer.email_confirmation.thanks') %>- <br />- <%= Spree.t('newsletter_mailer.email_confirmation.store_team', store_name: current_store.name) %>-</p>\ No newline at end of file+<table class="signoff" width="100%" cellpadding="0" cellspacing="0" role="presentation">+ <tr>+ <td align="center">+ <p class="f-fallback">+ <%= Spree.t('newsletter_mailer.email_confirmation.thanks') %>+ <br />+ <%= Spree.t('newsletter_mailer.email_confirmation.store_team', store_name: current_store.name) %>+ </p>+ </td>+ </tr>+</table>diff --git a/spree/emails/app/views/spree/order_mailer/cancel_email.html.erb b/spree/emails/app/views/spree/order_mailer/cancel_email.html.erbindex c082496126..040dc77cc3 100644--- a/spree/emails/app/views/spree/order_mailer/cancel_email.html.erb+++ b/spree/emails/app/views/spree/order_mailer/cancel_email.html.erb@@ -1,24 +1,34 @@-<h1>- <%= Spree.t('order_mailer.cancel_email.dear_customer', name: name_for(@order)) %>-</h1>-<p>- <%= Spree.t('order_mailer.cancel_email.instructions') %>-</p>+<%= render 'spree/shared/purchased_items_styles' %>-<table class="purchase" role="presentation">+<table class="hero" width="100%" cellpadding="0" cellspacing="0" role="presentation"><tr>- <td>- <h3> <%= Spree.t('order_mailer.cancel_email.order_summary_canceled', number: @order.number) %></h3>+ <td align="center">+ <div class="hero_content f-fallback">+ <h1><%= Spree.t('order_mailer.cancel_email.subject') %></h1>+ <p class="greeting"><%= Spree.t('order_mailer.cancel_email.dear_customer', name: name_for(@order)) %></p>+ <p><%= Spree.t('order_mailer.cancel_email.instructions') %></p>+ </div></td></tr>+</table>++<table class="section" width="100%" cellpadding="0" cellspacing="0" role="presentation"><tr>- <td colspan="2">+ <td>+ <h3 class="f-fallback"><%= Spree.t('order_mailer.cancel_email.order_summary_canceled', number: @order.number) %></h3><%= render 'spree/shared/purchased_items_table', line_items: @order.line_items, order: @order %></td></tr></table>-<p>- <%= Spree.t('order_mailer.cancel_email.thanks') %>- <br />- <%= Spree.t('order_mailer.store_team', store_name: current_store.name) %>-</p>++<table class="signoff" width="100%" cellpadding="0" cellspacing="0" role="presentation">+ <tr>+ <td align="center">+ <p class="f-fallback">+ <%= Spree.t('order_mailer.cancel_email.thanks') %>+ <br />+ <%= Spree.t('order_mailer.store_team', store_name: current_store.name) %>+ </p>+ </td>+ </tr>+</table>diff --git a/spree/emails/app/views/spree/order_mailer/confirm_email.html.erb b/spree/emails/app/views/spree/order_mailer/confirm_email.html.erbindex 6df7ad074f..6c9f06d94f 100644--- a/spree/emails/app/views/spree/order_mailer/confirm_email.html.erb+++ b/spree/emails/app/views/spree/order_mailer/confirm_email.html.erb@@ -1,23 +1,34 @@-<h1>- <%= Spree.t('order_mailer.confirm_email.dear_customer', name: name_for(@order)) %>-</h1>-<p>- <%= Spree.t('order_mailer.confirm_email.instructions') %>-</p>-<table class="purchase" role="presentation">+<%= render 'spree/shared/purchased_items_styles' %>++<table class="hero" width="100%" cellpadding="0" cellspacing="0" role="presentation"><tr>- <td>- <h3><%= Spree.t('order_mailer.confirm_email.order_summary', number: @order.number) %></h3>+ <td align="center">+ <div class="hero_content f-fallback">+ <h1><%= Spree.t('order_mailer.confirm_email.subject') %></h1>+ <p class="greeting"><%= Spree.t('order_mailer.confirm_email.dear_customer', name: name_for(@order)) %></p>+ <p><%= Spree.t('order_mailer.confirm_email.instructions') %></p>+ </div></td></tr>+</table>++<table class="section" width="100%" cellpadding="0" cellspacing="0" role="presentation"><tr>- <td colspan="2">+ <td>+ <h3 class="f-fallback"><%= Spree.t('order_mailer.confirm_email.order_summary', number: @order.number) %></h3><%= render 'spree/shared/purchased_items_table', line_items: @order.line_items, order: @order %></td></tr></table>-<p>- <%= Spree.t('order_mailer.confirm_email.thanks') %>- <br />- <%= Spree.t('order_mailer.store_team', store_name: current_store.name) %>-</p>++<table class="signoff" width="100%" cellpadding="0" cellspacing="0" role="presentation">+ <tr>+ <td align="center">+ <p class="f-fallback">+ <%= Spree.t('order_mailer.confirm_email.thanks') %>+ <br />+ <%= Spree.t('order_mailer.store_team', store_name: current_store.name) %>+ </p>+ </td>+ </tr>+</table>diff --git a/spree/emails/app/views/spree/order_mailer/payment_link_email.html.erb b/spree/emails/app/views/spree/order_mailer/payment_link_email.html.erbindex c07c2e6bc3..efdc95867c 100644--- a/spree/emails/app/views/spree/order_mailer/payment_link_email.html.erb+++ b/spree/emails/app/views/spree/order_mailer/payment_link_email.html.erb@@ -1,16 +1,17 @@-<h1>- <%= Spree.t('order_mailer.confirm_email.dear_customer', name: name_for(@order)) %>-</h1>-<p>- <%= Spree.t('order_mailer.payment_link_email.message', store_name: @current_store.name) %>-</p>-<p>- <%= link_to Spree.t('order_mailer.payment_link_email.pay_for_order'), @checkout_payment_url, class: 'button' %>- <p>- <%= Spree.t('order_mailer.payment_link_email.message_copy_link') %>- <br>- <span style="word-break: break-all;">- <%= link_to @checkout_payment_url, @checkout_payment_url %>- </span>- </p>-</p>+<table class="hero" width="100%" cellpadding="0" cellspacing="0" role="presentation">+ <tr>+ <td align="center">+ <div class="hero_content f-fallback">+ <h1><%= Spree.t('order_mailer.payment_link_email.subject', number: @order.number) %></h1>+ <p class="greeting"><%= Spree.t('order_mailer.confirm_email.dear_customer', name: name_for(@order)) %></p>+ <p><%= Spree.t('order_mailer.payment_link_email.message', store_name: @current_store.name) %></p>+ <%= render 'spree/shared/mailer_button', url: @checkout_payment_url, label: Spree.t('order_mailer.payment_link_email.pay_for_order') %>+ <p class="sub">+ <%= Spree.t('order_mailer.payment_link_email.message_copy_link') %>+ <br>+ <%= link_to @checkout_payment_url, @checkout_payment_url %>+ </p>+ </div>+ </td>+ </tr>+</table>diff --git a/spree/emails/app/views/spree/order_mailer/store_owner_notification_email.html.erb b/spree/emails/app/views/spree/order_mailer/store_owner_notification_email.html.erbindex dd34972b07..2536ffac83 100644--- a/spree/emails/app/views/spree/order_mailer/store_owner_notification_email.html.erb+++ b/spree/emails/app/views/spree/order_mailer/store_owner_notification_email.html.erb@@ -1,23 +1,33 @@-<h1>- <%= Spree.t('order_mailer.store_owner_notification_email.heading') %>-</h1>-<p>- <%= Spree.t('order_mailer.store_owner_notification_email.instructions') %>-</p>-<table class="purchase" role="presentation">+<%= render 'spree/shared/purchased_items_styles' %>++<table class="hero" width="100%" cellpadding="0" cellspacing="0" role="presentation"><tr>- <td>- <h3><%= Spree.t('order_mailer.store_owner_notification_email.order_summary', number: @order.number) %></h3>+ <td align="center">+ <div class="hero_content f-fallback">+ <h1><%= Spree.t('order_mailer.store_owner_notification_email.heading') %></h1>+ <p><%= Spree.t('order_mailer.store_owner_notification_email.instructions') %></p>+ </div></td></tr>+</table>++<table class="section" width="100%" cellpadding="0" cellspacing="0" role="presentation"><tr>- <td colspan="2">+ <td>+ <h3 class="f-fallback"><%= Spree.t('order_mailer.store_owner_notification_email.order_summary', number: @order.number) %></h3><%= render 'spree/shared/purchased_items_table', line_items: @order.line_items, order: @order %></td></tr></table>-<p>- <%= Spree.t('order_mailer.store_owner_notification_email.thanks') %>- <br />- <%= Spree.t('order_mailer.store_team', store_name: current_store.name) %>-</p>++<table class="signoff" width="100%" cellpadding="0" cellspacing="0" role="presentation">+ <tr>+ <td align="center">+ <p class="f-fallback">+ <%= Spree.t('order_mailer.store_owner_notification_email.thanks') %>+ <br />+ <%= Spree.t('order_mailer.store_team', store_name: current_store.name) %>+ </p>+ </td>+ </tr>+</table>diff --git a/spree/emails/app/views/spree/reimbursement_mailer/reimbursement_email.html.erb b/spree/emails/app/views/spree/reimbursement_mailer/reimbursement_email.html.erbindex 1979c2084c..303660e9d4 100644--- a/spree/emails/app/views/spree/reimbursement_mailer/reimbursement_email.html.erb+++ b/spree/emails/app/views/spree/reimbursement_mailer/reimbursement_email.html.erb@@ -1,53 +1,68 @@-<h1>- <%= Spree.t('reimbursement_mailer.reimbursement_email.dear_customer', name: name_for(@order)) %>-</h1>-<p>- <%= Spree.t('reimbursement_mailer.reimbursement_email.instructions') %>-</p>-<p>- <%= Spree.t('reimbursement_mailer.reimbursement_email.refund_summary') %>-</p>-<p>- <%= Spree.t('reimbursement_mailer.reimbursement_email.total_refunded', total: @reimbursement.display_total) %>-</p>-<% if @reimbursement.return_items.exchange_requested.present? %>- <p>- <%= Spree.t('reimbursement_mailer.reimbursement_email.exchange_summary') %>- </p>+<%= render 'spree/shared/purchased_items_styles' %>++<table class="hero" width="100%" cellpadding="0" cellspacing="0" role="presentation">+ <tr>+ <td align="center">+ <div class="hero_content f-fallback">+ <h1><%= Spree.t('reimbursement_mailer.reimbursement_email.subject') %></h1>+ <p class="greeting"><%= Spree.t('reimbursement_mailer.reimbursement_email.dear_customer', name: name_for(@order)) %></p>+ <p><%= Spree.t('reimbursement_mailer.reimbursement_email.instructions') %></p>+ </div>+ </td>+ </tr>+</table>- <table class="purchase_content">- <% @reimbursement.return_items.exchange_requested.each do |return_item| %>- <tr>- <td class="purchase_image">- <% image = return_item.variant.primary_media || return_item.variant.product.primary_media %>- <% if image.present? && image.attached? %>- <%= link_to(spree_image_tag(image, variant: :mini, alt: return_item.variant.name), spree_storefront_resource_url(return_item.variant.product)) %>- <% else %>- <%= link_to(image_tag('noimage/small.png', alt: return_item.variant.name), spree_storefront_resource_url(return_item.variant.product)) %>- <% end %>- </td>- <td class="purchase_item">- <strong>- <span class="f-fallback">- <%= link_to return_item.variant.name, spree_storefront_resource_url(return_item.variant.product) %>- </span>- </strong>- <p class="purchase_item--additional">- <%= "(#{return_item.exchange_variant.options_text})" if return_item.exchange_variant.options_text.present? -%>- </p>- </td>- </tr>- <% end %>+<table class="section" width="100%" cellpadding="0" cellspacing="0" role="presentation">+ <tr>+ <td>+ <h3 class="f-fallback"><%= Spree.t('reimbursement_mailer.reimbursement_email.refund_summary') %></h3>+ <p class="strong f-fallback"><%= Spree.t('reimbursement_mailer.reimbursement_email.total_refunded', total: @reimbursement.display_total) %></p>+ </td>+ </tr>+</table>++<% if @reimbursement.return_items.exchange_requested.present? %>+ <table class="section" width="100%" cellpadding="0" cellspacing="0" role="presentation">+ <tr>+ <td>+ <h3 class="f-fallback"><%= Spree.t('reimbursement_mailer.reimbursement_email.exchange_summary') %></h3>+ <% @reimbursement.return_items.exchange_requested.each do |return_item| %>+ <% product_url = spree_storefront_resource_url(return_item.variant.product) %>+ <table class="item" width="100%" cellpadding="0" cellspacing="0" role="presentation">+ <tr>+ <td class="item_image" width="96" valign="middle">+ <% image = return_item.variant.primary_media || return_item.variant.product.primary_media %>+ <% if image.present? && image.attached? %>+ <%= link_to spree_image_tag(image, variant: :small, alt: return_item.variant.name, width: 80, class: 'item_thumb'), product_url %>+ <% else %>+ <%= link_to image_tag('noimage/small.png', alt: return_item.variant.name, width: 80, class: 'item_thumb'), product_url %>+ <% end %>+ </td>+ <td class="item_info" valign="middle">+ <%= link_to return_item.variant.name, product_url, class: 'f-fallback item_name' %>+ <% if return_item.exchange_variant.options_text.present? %>+ <p class="item_meta"><%= return_item.exchange_variant.options_text %></p>+ <% end %>+ </td>+ </tr>+ </table>+ <% end %>+ <% if @reimbursement.return_items.awaiting_return.present? && Spree::Config[:expedited_exchanges] %>+ <p class="sub f-fallback"><%= Spree.t('reimbursement_mailer.reimbursement_email.days_to_send', days: Spree::Config[:expedited_exchanges_days_window]) %></p>+ <% end %>+ </td>+ </tr></table>- <% if @reimbursement.return_items.awaiting_return.present? && Spree::Config[:expedited_exchanges] %>- <p>- <%= Spree.t('reimbursement_mailer.reimbursement_email.days_to_send', days: Spree::Config[:expedited_exchanges_days_window]) %>- </p>- <% end %><% end %>-<p>- <%= Spree.t('reimbursement_mailer.reimbursement_email.thanks') %>- <br />- <%= Spree.t('reimbursement_mailer.reimbursement_email.store_team', store_name: current_store.name) %>-</p>+<table class="signoff" width="100%" cellpadding="0" cellspacing="0" role="presentation">+ <tr>+ <td align="center">+ <p class="f-fallback">+ <%= Spree.t('reimbursement_mailer.reimbursement_email.thanks') %>+ <br />+ <%= Spree.t('reimbursement_mailer.reimbursement_email.store_team', store_name: current_store.name) %>+ </p>+ </td>+ </tr>+</table>diff --git a/spree/emails/app/views/spree/shared/_purchased_items_table.html.erb b/spree/emails/app/views/spree/shared/_purchased_items_table.html.erbindex 7ed5a56d7a..ff2c9e8f97 100644--- a/spree/emails/app/views/spree/shared/_purchased_items_table.html.erb+++ b/spree/emails/app/views/spree/shared/_purchased_items_table.html.erb@@ -1,23 +1,17 @@-<table class="purchase_content">- <%= render collection: line_items, partial: 'spree/shared/purchased_items_table/line_item', as: :line_item %>+<%= render collection: line_items, partial: 'spree/shared/purchased_items_table/line_item', as: :line_item %>++<table class="summary purchase_content" width="100%" cellpadding="0" cellspacing="0" role="presentation"><%= render 'spree/shared/purchased_items_table/subtotal', order: order %><% if order.line_item_adjustments.exists? %><% if order.all_adjustments.promotion.eligible.exists? %><% order.all_adjustments.promotion.eligible.group_by(&:label).each do |label, adjustments| %><tr>- <td></td>- <td>- <p class="f-fallback purchase_total purchase_total--label">- <%= Spree.t(:promotion) %>:- </p>- <p class="f-fallback purchase_total--name purchase_total--label">- <%= label %>- </p>+ <td valign="top">+ <span class="f-fallback"><%= Spree.t(:promotion) %></span>+ <span class="f-fallback summary_sub"><%= label %></span></td>- <td class="purchase_total-col">- <p class="f-fallback purchase_total">- <%= Spree::Money.new(adjustments.sum(&:amount), currency: order.currency) %>- </p>+ <td class="summary_value" align="right" valign="top">+ <span class="f-fallback"><%= Spree::Money.new(adjustments.sum(&:amount), currency: order.currency) %></span></td></tr><% end %>@@ -25,49 +19,34 @@<% end %><% order.shipments.group_by { |s| s.selected_shipping_rate&.name }.each do |name, shipments| %><tr>- <td></td>- <td>- <p class="f-fallback purchase_total purchase_total--label">- <%= Spree.t(:shipping) %>:- </p>- <p class="f-fallback purchase_total--name purchase_total--label">- <%= name %>- </p>+ <td valign="top">+ <span class="f-fallback"><%= Spree.t(:shipping) %></span>+ <% if name.present? %>+ <span class="f-fallback summary_sub"><%= name %></span>+ <% end %></td>- <td class="purchase_total-col">- <p class="f-fallback purchase_total">- <%= Spree::Money.new(shipments.sum(&:discounted_cost), currency: order.currency) %>- </p>+ <td class="summary_value" align="right" valign="top">+ <span class="f-fallback"><%= Spree::Money.new(shipments.sum(&:discounted_cost), currency: order.currency) %></span></td></tr><% end %><% if order.additional_tax_total != 0 %><tr>- <td></td>- <td>- <p class="f-fallback purchase_total purchase_total--label">- <%= Spree.t(:tax) %>:- </p>+ <td valign="middle">+ <span class="f-fallback"><%= Spree.t(:tax) %></span></td>- <td class="purchase_total-col">- <p class="f-fallback purchase_total">- <%= order.display_additional_tax_total.to_html %>- </p>+ <td class="summary_value" align="right" valign="middle">+ <span class="f-fallback"><%= order.display_additional_tax_total.to_html %></span></td></tr><% end %><% if order.gift_card_total.positive? %><tr>- <td></td>- <td>- <p class="f-fallback purchase_total purchase_total--label">- <%= Spree.t(:gift_card) %>:- </p>+ <td valign="middle">+ <span class="f-fallback"><%= Spree.t(:gift_card) %></span></td>- <td class="purchase_total-col">- <p class="f-fallback purchase_total">- -<%= order.display_gift_card_total.to_html %>- </p>+ <td class="summary_value" align="right" valign="middle">+ <span class="f-fallback">-<%= order.display_gift_card_total.to_html %></span></td></tr><% end %>diff --git a/spree/emails/app/views/spree/shared/purchased_items_table/_adjustment.html.erb b/spree/emails/app/views/spree/shared/purchased_items_table/_adjustment.html.erbindex e4e1663a48..cb1e6ea59c 100644--- a/spree/emails/app/views/spree/shared/purchased_items_table/_adjustment.html.erb+++ b/spree/emails/app/views/spree/shared/purchased_items_table/_adjustment.html.erb@@ -1,13 +1,8 @@<tr>- <td></td>- <td>- <p class="f-fallback purchase_total purchase_total--label">- <%= adjustment.label %>:- </p>+ <td valign="middle">+ <span class="f-fallback"><%= adjustment.label %></span></td>- <td class="purchase_total-col">- <p class="f-fallback purchase_total">- <%= Spree::Money.new(adjustment.amount, currency: order.currency) %>- </p>+ <td class="summary_value" align="right" valign="middle">+ <span class="f-fallback"><%= Spree::Money.new(adjustment.amount, currency: order.currency) %></span></td></tr>diff --git a/spree/emails/app/views/spree/shared/purchased_items_table/_line_item.html.erb b/spree/emails/app/views/spree/shared/purchased_items_table/_line_item.html.erbindex b1dab0a901..912c39fd93 100644--- a/spree/emails/app/views/spree/shared/purchased_items_table/_line_item.html.erb+++ b/spree/emails/app/views/spree/shared/purchased_items_table/_line_item.html.erb@@ -1,24 +1,23 @@-<tr>- <td class="purchase_image">- <% image = line_item.variant.primary_media || line_item.product.primary_media %>- <% if image.present? && image.attached? %>- <%= link_to(spree_image_tag(image, variant: :mini, alt: line_item.name), spree_storefront_resource_url(line_item.product)) %>- <% else %>- <%= link_to(image_tag('noimage/small.png', alt: line_item.name), spree_storefront_resource_url(line_item.product)) %>- <% end %>- </td>- <td class="purchase_item">- <strong>- <span class="f-fallback">- <%= link_to line_item.name, spree_storefront_resource_url(line_item.product) %>- </span>- </strong>- <p class="purchase_item--additional"><%= line_item.variant.options_text -%></p>- </td>- <td class="align-right" width="30%">- <span class="f-fallback purchase_item_price">- <%= line_item.quantity %> x <%= line_item.single_money %><br>- <%= line_item.display_amount %>- </span>- </td>-</tr>+<table class="item" width="100%" cellpadding="0" cellspacing="0" role="presentation">+ <tr>+ <td class="item_image" width="96" valign="middle">+ <% image = line_item.variant.primary_media || line_item.product.primary_media %>+ <% product_url = spree_storefront_resource_url(line_item.product) %>+ <% if image.present? && image.attached? %>+ <%= link_to spree_image_tag(image, variant: :small, alt: line_item.name, width: 80, class: 'item_thumb'), product_url %>+ <% else %>+ <%= link_to image_tag('noimage/small.png', alt: line_item.name, width: 80, class: 'item_thumb'), product_url %>+ <% end %>+ </td>+ <td class="item_info" valign="middle">+ <%= link_to line_item.name, product_url, class: 'f-fallback item_name' %>+ <% if line_item.variant.options_text.present? %>+ <p class="item_meta"><%= line_item.variant.options_text %></p>+ <% end %>+ </td>+ <td class="item_amount" align="right" valign="middle">+ <p class="item_qty f-fallback"><%= line_item.quantity %> x <%= line_item.single_money %></p>+ <p class="item_price f-fallback"><%= line_item.display_amount %></p>+ </td>+ </tr>+</table>diff --git a/spree/emails/app/views/spree/shared/purchased_items_table/_subtotal.html.erb b/spree/emails/app/views/spree/shared/purchased_items_table/_subtotal.html.erbindex 888b01f051..2866a1e622 100644--- a/spree/emails/app/views/spree/shared/purchased_items_table/_subtotal.html.erb+++ b/spree/emails/app/views/spree/shared/purchased_items_table/_subtotal.html.erb@@ -1,13 +1,8 @@<tr>- <td class="purchase_footer" valign="middle"></td>- <td class="purchase_footer" valign="middle">- <p class="f-fallback purchase_total purchase_total--label">- <%= Spree.t('order_mailer.subtotal') %>- </p>+ <td valign="middle">+ <span class="f-fallback"><%= Spree.t(:subtotal) %></span></td>- <td class="purchase_footer" valign="middle">- <p class="f-fallback purchase_total">- <%= order.display_item_total %>- </p>+ <td class="summary_value" align="right" valign="middle">+ <span class="f-fallback"><%= order.display_item_total %></span></td></tr>diff --git a/spree/emails/app/views/spree/shared/purchased_items_table/_total.html.erb b/spree/emails/app/views/spree/shared/purchased_items_table/_total.html.erbindex 7c885d5f76..729d05ba99 100644--- a/spree/emails/app/views/spree/shared/purchased_items_table/_total.html.erb+++ b/spree/emails/app/views/spree/shared/purchased_items_table/_total.html.erb@@ -1,13 +1,8 @@-<tr>- <td></td>- <td>- <p class="f-fallback purchase_total purchase_total--label">- <strong><%= Spree.t('order_mailer.total') %></strong>- </p>+<tr class="summary_total">+ <td valign="middle">+ <span class="f-fallback"><%= Spree.t(:total) %></span></td>- <td>- <p class="f-fallback purchase_total">- <strong><%= order.display_total_minus_store_credits %></strong>- </p>+ <td class="summary_value" align="right" valign="middle">+ <span class="f-fallback"><%= order.display_total_minus_store_credits %></span></td></tr>diff --git a/spree/emails/app/views/spree/shipment_mailer/shipped_email.html.erb b/spree/emails/app/views/spree/shipment_mailer/shipped_email.html.erbindex e8baa46b03..c86619a70c 100644--- a/spree/emails/app/views/spree/shipment_mailer/shipped_email.html.erb+++ b/spree/emails/app/views/spree/shipment_mailer/shipped_email.html.erb@@ -1,36 +1,41 @@-<h1>- <%= Spree.t('shipment_mailer.shipped_email.dear_customer', name: name_for(@shipment.order)) %>-</h1>-<p>- <%= Spree.t('shipment_mailer.shipped_email.instructions', number: @shipment.order.number) %>-</p>-<table class="purchase" role="presentation">+<%= render 'spree/shared/purchased_items_styles' %>++<table class="hero" width="100%" cellpadding="0" cellspacing="0" role="presentation"><tr>- <td>- <h3><%= Spree.t('shipment_mailer.shipped_email.shipment_summary') %></h3>+ <td align="center">+ <div class="hero_content f-fallback">+ <h1><%= Spree.t('shipment_mailer.shipped_email.subject') %></h1>+ <p class="greeting"><%= Spree.t('shipment_mailer.shipped_email.dear_customer', name: name_for(@shipment.order)) %></p>+ <p><%= Spree.t('shipment_mailer.shipped_email.instructions', number: @shipment.order.number) %></p>+ <p><%= Spree.t('shipment_mailer.shipped_email.shipping_method', shipping_method: @shipment.shipping_method.name) %></p>+ <% if @shipment.tracking %>+ <p><%= Spree.t('shipment_mailer.shipped_email.track_information', tracking: @shipment.tracking) %></p>+ <% end %>+ <% if @shipment.tracking_url %>+ <p><%= Spree.t('shipment_mailer.shipped_email.track_link', url: shipment_tracking_link_to(shipment: @shipment)).html_safe %></p>+ <% end %>+ </div></td></tr>+</table>++<table class="section" width="100%" cellpadding="0" cellspacing="0" role="presentation"><tr>- <td colspan="2">+ <td>+ <h3 class="f-fallback"><%= Spree.t('shipment_mailer.shipped_email.shipment_summary') %></h3><%= render 'spree/shared/purchased_items_table', line_items: @shipment.manifest.map(&:line_item), order: @shipment.order %></td></tr></table>-<p>- <%= Spree.t('shipment_mailer.shipped_email.shipping_method', shipping_method: @shipment.shipping_method.name) %>-</p>-<% if @shipment.tracking %>- <p>- <%= Spree.t('shipment_mailer.shipped_email.track_information', tracking: @shipment.tracking) %>- </p>-<% end %>-<% if @shipment.tracking_url %>- <p>- <%= Spree.t('shipment_mailer.shipped_email.track_link', url: shipment_tracking_link_to(shipment: @shipment)).html_safe %>- </p>-<% end %>-<p>- <%= Spree.t('shipment_mailer.shipped_email.thanks') %>- <br />- <%= Spree.t('shipment_mailer.shipped_email.store_team', store_name: current_store.name) %>-</p>++<table class="signoff" width="100%" cellpadding="0" cellspacing="0" role="presentation">+ <tr>+ <td align="center">+ <p class="f-fallback">+ <%= Spree.t('shipment_mailer.shipped_email.thanks') %>+ <br />+ <%= Spree.t('shipment_mailer.shipped_email.store_team', store_name: current_store.name) %>+ </p>+ </td>+ </tr>+</table>