spree/spree — pull request #5441 by BenMorganIO (2014-10-02 23:42:44+00:00)
Title: Guest token for cart

Within one spree application I discovered that there was an issue with creating multiple orders per guest user.

Assuming that you have a user with a signed cookie and they complete an order, then that user will have once order belonging to them and their guest token cookie.

This is amazing functionality, except that when a user does a second checkout, the order was properly added to a new order, but when redirected to the cart page, no line items were shown.

It turns out that the cart page was setting `@order = Spree::Order.new`.

Here, I just search all the incomplete orders then do a `find_or_initialize_by` for the `guest_token` cookie.