Files
openfoodnetwork/app/views/spree/checkout/_summary.html.erb
2013-08-19 17:02:02 +10:00

37 lines
1.3 KiB
Plaintext

<!-- Copied from spree. Modifications marked below. -->
<h3><%= t(:order_summary) %></h3>
<table data-hook="order_summary">
<tbody>
<tr data-hook="item_total">
<td><strong><%= t(:item_total) %>:</strong></td>
<td><strong><%= order.display_item_total %></strong></td>
</tr>
<tbody id="summary-order-charges" data-hook>
<!-- Begin modifications -->
<% adjustments = checkout_adjustments_for_summary(order) %>
<% adjustments.each do |adjustment| %>
<tr>
<td><%= adjustment.label %>: </td>
<td><%= adjustment.display_amount.to_html %></td>
</tr>
<% end %>
<!-- End modifications -->
</tbody>
<tr data-hook="order_total">
<td><strong><%= t(:order_total) %>:</strong></td>
<td><strong><span id='summary-order-total'><%= @order.display_total.to_html %></span></strong></td>
</tr>
<% if order.price_adjustment_totals.present? %>
<tbody id="price-adjustments" data-hook="order_details_price_adjustments">
<% @order.price_adjustment_totals.each do |label, total| %>
<tr class="total">
<td><strong><%= label %></strong></td>
<td><strong><span><%= total %></span></strong></td>
</tr>
<% end %>
</tbody>
<% end %>
</tbody>
</table>