Commit 458deb35aabb66bb11e034aa06942dab9fe909b1
1 parent
372bb9bb
Exists in
master
and in
29 other branches
Order products on shopping cart list alphabetically
Showing
1 changed file
with
1 additions
and
0 deletions
Show diff stats
plugins/shopping_cart/lib/shopping_cart_plugin/cart_helper.rb
... | ... | @@ -27,6 +27,7 @@ module ShoppingCartPlugin::CartHelper |
27 | 27 | quantity_opts.merge!({:align => 'center'}) if by_mail |
28 | 28 | price_opts = {:class => 'cart-table-price'} |
29 | 29 | price_opts.merge!({:align => 'right'}) if by_mail |
30 | + items.sort! {|a, b| Product.find(a.first).name <=> Product.find(b.first).name} | |
30 | 31 | |
31 | 32 | table = '<table id="cart-items-table" cellpadding="2" cellspacing="0" |
32 | 33 | border="'+(by_mail ? '1' : '0')+'" | ... | ... |