X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=app%2Fviews%2Fstore%2F_cart.html.erb;h=cc84043d9180968f7431ab16e7be41546fa38ca0;hb=f9d45398338f9e5b2dabd768fcd793c4f81934f2;hp=01fbeb5ed357b0a356582f840c7e5aaae04ff3e0;hpb=aff195f08c5fc2b8db74058b34720164148cfb4e;p=depot.git diff --git a/app/views/store/_cart.html.erb b/app/views/store/_cart.html.erb index 01fbeb5..cc84043 100644 --- a/app/views/store/_cart.html.erb +++ b/app/views/store/_cart.html.erb @@ -1,11 +1,13 @@
Your Cart
- - <%= render(:partial => 'cart_item', :collection => cart.items) %> +
+ <%= render(:partial => 'cart_item', :collection => cart.items.sort_by {|item| item.product.title}) %> - - - - -
Total<%= number_to_currency(cart.total_price, :unit => "£") %>
+ + Total + <%= number_to_currency(cart.total_price, :unit => "£") %> + + -<%= button_to 'Empty cart', :action => :empty_cart %> +<% form_remote_tag :url => {:action => 'empty_cart'} do %> + <%= submit_tag "Empty cart" %> +<% end %>