spree/spree_social — pull request #100 by bbuchalter (2013-08-05 18:50:47+00:00)
Title: Allow spree_core to handle merging guest orders

Steps to reproduce:
* Authenticate via spree_social
* Add items to cart
* Logout
* Visit any page which might check initialize a new order (doesn't need to add an item necessarily)
* Login again via spree_social

Expected behavior: Guest cart would be merged with user's last incomplete order
Actual behavior: User's last incomplete order is abandoned

Because spree_social always associates the guest cart with the newly logged in user, the last_incomplete_order for the user is always their current_order, which prevents [set_current_order](https://github.com/spree/spree/blob/6b44bc780cbf30f7b568ad785f2a8234235b8248/core/lib/spree/core/controller_helpers/order.rb#L63) from properly merging the *true* last incomplete order.