Browse files

Check for last_incomplete_order before setting session[:order_id] ins…

…ide set_current_order
  • Loading branch information...
1 parent 62f7d92 commit e7a46e5fab942454a6f2d309d3ff04fdd45abd3c @radar radar committed May 31, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 core/lib/spree/core/controller_helpers.rb
View
2 core/lib/spree/core/controller_helpers.rb
@@ -53,7 +53,7 @@ def spree_current_user
def set_current_order
if spree_current_user
last_incomplete_order = spree_current_user.last_incomplete_spree_order
- if session[:order_id].nil?
+ if session[:order_id].nil? && last_incomplete_order
session[:order_id] = last_incomplete_order.id
elsif current_order && last_incomplete_order && current_order != last_incomplete_order
current_order.merge!(last_incomplete_order)

0 comments on commit e7a46e5

Please sign in to comment.