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.

Normalize money rendering in email order summary rows

Damian Legawieca48be26b7dac
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.erb
index 88de8ef6dd..bf9935a1e3 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
@@ -19,7 +19,7 @@
<% if order.additional_tax_total != 0 %>
<%= render 'spree/shared/purchased_items_table/summary_row',
label: Spree.t(:tax),
- value: order.display_additional_tax_total.to_html %>
+ value: order.display_additional_tax_total %>
<% end %>
<% if order.gift_card_total.positive? %>
<%= render 'spree/shared/purchased_items_table/summary_row',
diff --git a/spree/emails/app/views/spree/shared/purchased_items_table/_summary_row.html.erb b/spree/emails/app/views/spree/shared/purchased_items_table/_summary_row.html.erb
index badf9ce92b..e002c0bda1 100644
--- a/spree/emails/app/views/spree/shared/purchased_items_table/_summary_row.html.erb
+++ b/spree/emails/app/views/spree/shared/purchased_items_table/_summary_row.html.erb
@@ -9,6 +9,6 @@
<% end %>
</td>
<td class="summary_value" align="right" valign="top">
- <span class="f-fallback"><%= value %></span>
+ <span class="f-fallback"><%= value.respond_to?(:to_html) ? value.to_html : value %></span>
</td>
</tr>