Is it possible to have a unique cart for different users? If I log in as a user and add items to my cart, and then log in as another user, it shows the same items in my cart. Can this be changed?


As you've found, Commerce carts exist independently of a Craft user's session.

A workaround would be to write a simple plugin that listens to something like the onLogin event and that plugin would check for the commerce_cart cookie and if it exists, nuke it.

That would force a new cart for each new login.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.