X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=app%2Fviews%2Fstore%2F_cart.html.erb;h=313d23e5cd072d276050de69dd43db8aa69ba85b;hb=2e4e591080e228dec676acf40b9e7bc4b044b8bc;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..313d23e 100644
--- a/app/views/store/_cart.html.erb
+++ b/app/views/store/_cart.html.erb
@@ -1,11 +1,21 @@
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 %>
+<% unless @during_checkout %>
+
+ <% form_remote_tag :url => {:action => 'checkout'} do %>
+ <%= submit_tag "Checkout" %>
+ <% end %>
+
+ <% form_remote_tag :url => {:action => 'empty_cart'} do %>
+ <%= submit_tag "Empty cart" %>
+ <% end %>
+
+<% end %>