I use my own version of ProfileMigrator to merge the cart when the user logs in.
We want to clear the cart of the user we want to log in before merging the anonymous user's cart.
With the code bellow, it works but we have a specific problem.
If a user adds items then log in, the cart is merged and everything's fine.
If I go back to an anonymous cart and then try to log in with the same user name, the carts are merged but when I check in the OrderGroup table, the CustomerName field is empty. So we have a couple of records with no CustomerName in our table.
Is this the correct way to clear the cart before merging the anonymous one or is there a cleaner way?
Hi,
I use my own version of ProfileMigrator to merge the cart when the user logs in.
We want to clear the cart of the user we want to log in before merging the anonymous user's cart.
With the code bellow, it works but we have a specific problem.
If a user adds items then log in, the cart is merged and everything's fine.
If I go back to an anonymous cart and then try to log in with the same user name, the carts are merged but when I check in the OrderGroup table, the CustomerName field is empty. So we have a couple of records with no CustomerName in our table.
Is this the correct way to clear the cart before merging the anonymous one or is there a cleaner way?