<% # render text email in console. parts[1] for html body # puts Spree::OrderMailer.confirm_email(Spree::Order.last).body.parts[0].body @prices = @order.flow_cart_breakdown @total_price = @prices.pop %>

Dear <%= @order.bill_address.firstname %>


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

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

<% @order.line_items.each do |line_item| %> <% end %>
Product Price Quantity Total
<%= line_item.variant.product.name %> <%= @order.flow_line_item_price(line_item) %> <%= line_item.quantity %> <%= @order.flow_line_item_price(line_item, :with_quantity) %>

Total

<% @prices.each do |price| %> <% end %>
<%= price.name.capitalize %><%= price.label %>
<%= Spree.t(:total) %> <%= @total_price.label %>
Payment method <%= @order.flow_paymeny_method == 'paypal' ? 'PayPal' : 'Credit Card' %>

<% ['ship', 'bill'].each do |name| address = @order.send('%s_address' % name) %>

<%= name.capitalize %>ing address

Full name <%= address.firstname %> <%= address.lastname %>
Address <%= address.address1 %>
City <%= address.city %>
Country <%= address.country.name rescue '-' %>, <%= address.state.name rescue '-' %>

<% end %>

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