Page 1 of 1

Merge Cart in Broadleaf 4.0

Posted: Sun Jul 12, 2015 12:32 am
by rudy
Hi,

Is the merge-cart capability present in broadleaf?
By merge i mean, the merging of anynomous user's cart and registered user's cart on login. :D

Re: Merge Cart in Broadleaf 4.0

Posted: Mon Jul 27, 2015 4:38 am
by phillipuniverse
Yes but the default functionality (as it has been since Broadleaf 3.0) is to not merge but just overwrite. This is how it works:

1. User is anonymously browsing the site
2. User adds Item 1 to their cart
3. User logs in
4. User still sees Item 1 in their cart
5. User logs out
6. The user doesn't have anything in their cart (they don't actually have a cart yet)
7. The user logs in
8. The user still sees Item 1 in their cart
9. The user logs out again, no items
10. The user adds item 2 to their cart
11. The user logs in
12. The user sees only item 2 in their cart and they have a wish list that contains item 1

Basically, the active cart is always the current one. Any other cart that the user has previously is saved off as a dated wishlist (NAMED order).

Re: Merge Cart in Broadleaf 4.0

Posted: Fri Jul 31, 2015 11:39 am
by rudy
Thanks for the reply phillip.
I have overridden some of the code to customize the merge cart behavior as per need. :)