# Cart empty when user logged in..

**URL:** <https://forum.shopware.com/t/cart-empty-when-user-logged-in/30317>\
**Category:** Shopware 3.5\
**Tags:** general\
**Created:** [8. September 2015 um 15:02 UTC](https://forum.shopware.com/t/cart-empty-when-user-logged-in/30317 "2015-09-08T15:02:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![testusernetwork1](https://avatars.discourse-cdn.com/v4/letter/t/e5b9ba/32.png) [@testusernetwork1](https://forum.shopware.com/u/testusernetwork1)\
**Post date:** [8. September 2015 um 15:02 UTC](https://forum.shopware.com/t/cart-empty-when-user-logged-in/30317/1 "2015-09-08T15:02:20Z")

</div>

Hi, In my shop site, When the user some items in the cart, Then they enter the login page… Guest checkout and new user checkout working fine… But, when existing user login using their credentials the shopping cart become empty… Please help me to fix this issue… it is urgent… Thanking in advance, Team

---

<div class="post-metadata">

**Author:** ![DanielNogel](https://avatars.discourse-cdn.com/v4/letter/d/96bed5/32.png) [@DanielNogel](https://forum.shopware.com/u/DanielNogel)\
**Post date:** [8. September 2015 um 18:21 UTC](https://forum.shopware.com/t/cart-empty-when-user-logged-in/30317/2 "2015-09-08T18:21:46Z")

</div>

Hi, when an existing user logs in, the SessionID is regenerated, in order to prevent session hijacking. Shopware will make sure, that the cart (which is stored in the DB using the sessionID) will be updated to the new sessionID - so that this exact scenario does not happen. Your case, however, sound a bit, as if this might be related. Perhaps some plugins? You can check my thesis this way: \* as a not logged in user, put something in your cart. \* check the sessionID from the session cookie \* it should match the latest entry in s\_order\_basket \* now log in \* check the sessionID from the session cookie \* probably the latest entry in s\_order\_basket still have the previous value \* it should have the new sessionID Please notice, that such effects can also occur, when subshop / language shop changes are involved. Best regards, Daniel

---

<div class="post-metadata">

**Author:** ![testusernetwork1](https://avatars.discourse-cdn.com/v4/letter/t/e5b9ba/32.png) [@testusernetwork1](https://forum.shopware.com/u/testusernetwork1)\
**Post date:** [17. November 2015 um 15:22 UTC](https://forum.shopware.com/t/cart-empty-when-user-logged-in/30317/3 "2015-11-17T15:22:52Z")

</div>

Hallo sir, As you said, when i switch my language from german to english the cart goes to empty. Please tell me a solution Thanking in advance Team
