ruby-on-railsspreedeface

Spree deface email text template


I am trying to insert a text after checkout email message. I'm found template in spree/order_mailer/confirm_email.text.erb

<%= Spree.t('order_mailer.confirm_email.dear_customer') %>

<%= Spree.t('order_mailer.confirm_email.instructions') %>

============================================================
<%= Spree.t('order_mailer.confirm_email.order_summary') %>
============================================================
<% @order.line_items.each do |item| %>
<%= item.variant.sku %> <%= raw(item.variant.product.name) %> <%= raw(item.variant.options_text) -%> (<%=item.quantity%>) @ <%= item.single_money %> = <%= item.display_amount %>
<% end %>
============================================================
<%= Spree.t('order_mailer.confirm_email.subtotal', :subtotal => @order.display_item_total) %>

<% @order.adjustments.eligible.each do |adjustment| %>
  <%= raw(adjustment.label) %> <%= adjustment.display_amount %>
<% end %>

<%= Spree.t('order_mailer.confirm_email.total', :total => @order.display_total) %>

<%= Spree.t('order_mailer.confirm_email.thanks') %>

So I don't know how to add some text after this, there are no any selectors:

Deface::Override.new(
    :virtual_path => "spree/order_mailer/confirm_email",
    :insert_bottom => '*',
    :partial      => "spree/shared/confirm_email",    
    :name         => "confirm_email",
    :original     => '3a8c298b4d9884a4d9f842b23fcb4fabf92ef0f3'
)

Could you advice me any ways to solve this?


Solution

  • Found solution here: How to add Spree email attachment (image) from products.images?. I'm created a new template /app/views/spree/order_mailer/confirm_email.text.erb and added my code here.