bluedynamics / bda.plone.shop

Generic Shop Solution for Plone
Other
20 stars 15 forks source link

Cart is not cleaned at the end of the session #41

Open marfago opened 9 years ago

marfago commented 9 years ago

After adding some products to the cart, if you log out and log in again with a different user you will see the cart still containing the previous items. Looks like the cart cookie is not removed at logout.

rnixx commented 9 years ago

True, cart cookie is not removed when user logs out.

marfago commented 9 years ago

Is that behavior correct? Shouldn't the cookie be associated to the specific user?

rnixx commented 9 years ago

True, this would be the clean solution.

Here are the locations where user id needs to be considered if user is logged in, anonymous shopping sessions needs to be possible though

https://github.com/bluedynamics/bda.plone.cart/blob/master/src/bda/plone/cart/browser/cart.js#L113 https://github.com/bluedynamics/bda.plone.cart/blob/master/src/bda/plone/cart/browser/cart.js#L440