Answers.Body: <p>As you've found, Commerce carts <a href="https://craftcommerce.com/docs/configuration#cartcookieduration" rel="nofollow noreferrer">exist independently</a> of a Craft user's session.</p>
  
  <p>A workaround would be to write a simple <a href="http://pluginfactory.io" rel="nofollow noreferrer">plugin</a> that listens to something like the <a href="https://craftcms.com/docs/plugins/events-reference#userSession-onLogin" rel="nofollow noreferrer">onLogin</a> event and that plugin would check for the <code>commerce_cart</code> cookie and if it exists, nuke it.</p>
  
  <p>That would force a new cart for each new login.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-25T20:21:14.393Z
Answers.LastActivityDate: 2017-01-25T20:21:14.393Z
Answers.UserDisplayName: Brad Bell
Body: <p>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?</p>
  
Tags: <plugin-craftcommerce>
Title: Unique carts for different users
ThreadText: # Unique carts for different users
  
  (Asked by: username_0 on 2017-01-25)
  
  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?
  
  **Tags:** plugin-craftcommerce
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-01-25. Score: 1 | Accepted answer
  
  As you've found, Commerce carts [exist independently](https://craftcommerce.com/docs/configuration#cartcookieduration) of a Craft user's session.
  
  A workaround would be to write a simple [plugin](http://pluginfactory.io) that listens to something like the [onLogin](https://craftcms.com/docs/plugins/events-reference#userSession-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.
  
  
  ---
  
  