Skip to content

armgit / spree

Public Imported from GitHub
0

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.

fix mailers layout

AleksandraKaminska3c28c3eb2a76
diff --git a/core/app/views/spree/shared/_base_mailer_stylesheets.html.erb b/core/app/views/spree/shared/_base_mailer_stylesheets.html.erb
index 7e1a5f983b..00c0fefac6 100644
--- a/core/app/views/spree/shared/_base_mailer_stylesheets.html.erb
+++ b/core/app/views/spree/shared/_base_mailer_stylesheets.html.erb
@@ -287,10 +287,20 @@
color: #333333;
}
+ .purchase_total--name {
+ margin: 0;
+ text-align: right;
+ color: #333333;
+ }
+
.purchase_total--label {
padding: 0 15px 0 0;
}
+ .purchase_total-col {
+ vertical-align: bottom;
+ }
+
body {
background-color: #F2F4F6;
color: #51545E;
@@ -400,6 +410,9 @@
.email-footer {
width: 100% !important;
}
+ .content-cell {
+ padding: 40px 15px !important;
+ }
}
@media (prefers-color-scheme: dark) {
diff --git a/core/app/views/spree/shared/_purchased_items_table.html.erb b/core/app/views/spree/shared/_purchased_items_table.html.erb
index c16b6bf573..25b4bf5167 100644
--- a/core/app/views/spree/shared/_purchased_items_table.html.erb
+++ b/core/app/views/spree/shared/_purchased_items_table.html.erb
@@ -8,10 +8,13 @@
<td></td>
<td>
<p class="f-fallback purchase_total purchase_total--label">
- <%= Spree.t(:promotion) %> <%= label %>:
+ <%= Spree.t(:promotion) %>:
+ </p>
+ <p class="f-fallback purchase_total--name purchase_total--label">
+ <%= label %>
</p>
</td>
- <td>
+ <td class="purchase_total-col">
<p class="f-fallback purchase_total">
<%= Spree::Money.new(adjustments.sum(&:amount), currency: order.currency) %>
</p>
@@ -25,10 +28,13 @@
<td></td>
<td>
<p class="f-fallback purchase_total purchase_total--label">
- <%= Spree.t(:shipping) %> <%= name %>:
+ <%= Spree.t(:shipping) %>:
+ </p>
+ <p class="f-fallback purchase_total--name purchase_total--label">
+ <%= name %>
</p>
</td>
- <td>
+ <td class="purchase_total-col">
<p class="f-fallback purchase_total">
<%= Spree::Money.new(shipments.sum(&:discounted_cost), currency: order.currency) %>
</p>
@@ -41,10 +47,13 @@
<td></td>
<td>
<p class="f-fallback purchase_total purchase_total--label">
- <%= Spree.t(:tax) %> <%= label %>:
+ <%= Spree.t(:tax) %>:
+ </p>
+ <p class="f-fallback purchase_total--name purchase_total--label">
+ <%= label %>
</p>
</td>
- <td>
+ <td class="purchase_total-col">
<p class="f-fallback purchase_total">
<%= Spree::Money.new(adjustments.sum(&:amount), currency: order.currency) %>
</p>
diff --git a/core/app/views/spree/shared/purchased_items_table/_line_item.html.erb b/core/app/views/spree/shared/purchased_items_table/_line_item.html.erb
index f7770cdedf..34c92cb88f 100644
--- a/core/app/views/spree/shared/purchased_items_table/_line_item.html.erb
+++ b/core/app/views/spree/shared/purchased_items_table/_line_item.html.erb
@@ -18,7 +18,7 @@
</strong>
<p class="purchase_item--additional"><%= raw(line_item.variant.options_text) -%></p>
</td>
- <td class="align-right">
+ <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 %>