End chapter 10
[depot.git] / app / views / store / _cart.html.erb
1 <div class="cart-title">Your Cart</div>
2 <table>
3 <%= render(:partial => 'cart_item', :collection => cart.items.sort_by {|item| item.product.title}) %>
4
5 <tr class="total-line">
6 <td colspan="2">Total</td>
7 <td class="total-cell"><%= number_to_currency(cart.total_price, :unit => "£") %></td>
8 </tr>
9 </table>
10
11 <% form_remote_tag :url => {:action => 'checkout'} do %>
12 <%= submit_tag "Checkout" %>
13 <% end %>
14
15 <% form_remote_tag :url => {:action => 'empty_cart'} do %>
16 <%= submit_tag "Empty cart" %>
17 <% end %>