drhenner/ror_ecommerce

View on GitHub
app/views/notifier/order_confirmation.html.erb

Summary

Maintainability
Test Coverage
<% @order.find_total %>

<h1>Hi <%= @user.name %>,</h1>
<p>
  Thanks you for your recent purchase at <%= @site_name %>.  Below you will see your confirmation details.
</p>

<h4>Order Number: <%= @order.number %></h4>
<ul>
  <% @order.order_items.group_by(&:variant).each do |variant, order_items| %>
    <li><%= order_items.size %> <%= variant.product_name %>: <%= order_items.size %></li>
  <% end %>
    <li>Order Total (<%= number_to_currency @invoice.amount %>)</li>
</ul>

<p>Thank you and have a great day!</p>
<%= render :partial => 'notifier/main_footer' %>