From 3322164af50ecf7befbcf3a420723c68da6ee48f Mon Sep 17 00:00:00 2001
From: Daniele Palombo
<%= item.variant.sku %> | <%= item.variant.product.name %> | @@ -20,10 +20,10 @@ <% end %>
- <%= Spree.t('shipment_mailer.shipped_email.track_information', tracking: @shipment.tracking) if @shipment.tracking %> + <%= Spree.t('shipment_mailer.shipped_email.track_information', tracking: @carton.tracking) if @carton.tracking %>
- <%= Spree.t('shipment_mailer.shipped_email.track_link', :url => @shipment.tracking_url) if @shipment.tracking_url %> + <%= Spree.t('shipment_mailer.shipped_email.track_link', :url => @carton.tracking_url) if @carton.tracking_url %>
<%= Spree.t('shipment_mailer.shipped_email.thanks') %>
diff --git a/core/spec/mailers/carton_mailer_spec.rb b/core/spec/mailers/carton_mailer_spec.rb
index 7f85244a68c..1ca9ea5e603 100644
--- a/core/spec/mailers/carton_mailer_spec.rb
+++ b/core/spec/mailers/carton_mailer_spec.rb
@@ -11,8 +11,8 @@
# Regression test for https://github.com/spree/spree/issues/2196
it "doesn't include out of stock in the email body" do
shipment_email = Spree::CartonMailer.shipped_email(order: order, carton: carton)
- expect(shipment_email.body).not_to include(%{Out of Stock})
- expect(shipment_email.body).to include(%{Your order has been shipped})
+ expect(shipment_email).not_to have_body_text(%{Out of Stock})
+ expect(shipment_email).to have_body_text(%{Your order has been shipped})
expect(shipment_email.subject).to eq "#{order.store.name} Shipment Notification ##{order.number}"
end
@@ -38,7 +38,7 @@
specify do
shipped_email = Spree::CartonMailer.shipped_email(order: order, carton: carton)
- expect(shipped_email.body).to include("Caro Cliente,")
+ expect(shipped_email).to have_body_text("Caro Cliente,")
end
end
end
From 67914228162aaf3cedb4bec2aeaf00fe608a2957 Mon Sep 17 00:00:00 2001
From: Daniele Palombo
+ <%= Spree.t('order_mailer.inventory_cancellation.dear_customer') %>
+
+ <%= Spree.t('order_mailer.inventory_cancellation.instructions') %>
+
+ <%= Spree.t('order_mailer.inventory_cancellation.order_summary_canceled') %>
+
+
+
From 44644027b14b137615b40cef138d38c6f8fc12b6 Mon Sep 17 00:00:00 2001
From: Daniele Palombo
+
+
+
+
+ <% @inventory_units.each do |item| %>
+
+
+
+ <% end %>
+ <%= item.variant.sku %>
+ <%= raw(item.variant.product.name) %>
+ <%= raw(item.variant.options_text) -%>
+
+
@@ -29,7 +29,7 @@
<% @order.adjustments.eligible.each do |adjustment| %>
<%= item.variant.sku %>
- <%= raw(item.variant.product.name) %>
- <%= raw(item.variant.options_text) -%>
+ <%= item.variant.product.name %>
+ <%= item.variant.options_text -%>
(<%=item.quantity%>) @ <%= item.single_money %> = <%= item.display_amount %>
<% end %>
diff --git a/core/app/views/spree/order_mailer/confirm_email.html.erb b/core/app/views/spree/order_mailer/confirm_email.html.erb
index f5498dcf5ac..1b3e9a4ac75 100644
--- a/core/app/views/spree/order_mailer/confirm_email.html.erb
+++ b/core/app/views/spree/order_mailer/confirm_email.html.erb
@@ -15,8 +15,8 @@
- <%= raw(adjustment.label) %>
+ <%= sanitize(adjustment.label) %>
<%= adjustment.display_amount %>
diff --git a/core/app/views/spree/order_mailer/inventory_cancellation_email.html.erb b/core/app/views/spree/order_mailer/inventory_cancellation_email.html.erb
index a9f3b7004c0..b4a36db1225 100644
--- a/core/app/views/spree/order_mailer/inventory_cancellation_email.html.erb
+++ b/core/app/views/spree/order_mailer/inventory_cancellation_email.html.erb
@@ -14,8 +14,8 @@
<% @inventory_units.each do |item| %>
<%= item.variant.sku %>
- <%= raw(item.variant.product.name) %>
- <%= raw(item.variant.options_text) -%>
+ <%= item.variant.product.name %>
+ <%= item.variant.options_text -%>
(<%=item.quantity%>) @ <%= item.single_money %> = <%= item.display_amount %>
<% end %>
diff --git a/core/app/views/spree/reimbursement_mailer/reimbursement_email.html.erb b/core/app/views/spree/reimbursement_mailer/reimbursement_email.html.erb
index baceffa5f2d..aaf518980c0 100644
--- a/core/app/views/spree/reimbursement_mailer/reimbursement_email.html.erb
+++ b/core/app/views/spree/reimbursement_mailer/reimbursement_email.html.erb
@@ -21,13 +21,13 @@
<% @reimbursement.return_items.exchange_requested.each do |return_item| %>
<%= item.variant.sku %>
- <%= raw(item.variant.product.name) %>
- <%= raw(item.variant.options_text) -%>
+ <%= item.variant.product.name %>
+ <%= item.variant.options_text -%>
<% end %>
From 682f6ae89809b1f1bd5e99faa446d7eac9621651 Mon Sep 17 00:00:00 2001
From: Daniele Palombo
- <%= return_item.variant.sku %> <%= raw(return_item.variant.name) %> <%= "(#{raw(return_item.variant.options_text)})" if return_item.variant.options_text.present? %>
+ <%= return_item.variant.sku %> <%= return_item.variant.name %> <%= "(#{return_item.variant.options_text})" if return_item.variant.options_text.present? %>
->
- <%= return_item.exchange_variant.sku %> <%= raw(return_item.exchange_variant.name) %> <%= "(#{raw(return_item.exchange_variant.options_text)})" if return_item.exchange_variant.options_text.present? %>
+ <%= return_item.exchange_variant.sku %> <%= return_item.exchange_variant.name %> <%= "(#{return_item.exchange_variant.options_text})" if return_item.exchange_variant.options_text.present? %>