# Shopware Cart

**URL:** <https://forum.shopware.com/t/shopware-cart/34718>\
**Category:** Programmierung\
**Created:** [23. Februar 2016 um 11:48 UTC](https://forum.shopware.com/t/shopware-cart/34718 "2016-02-23T11:48:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![oakrudi](https://avatars.discourse-cdn.com/v4/letter/o/779978/32.png) [@oakrudi](https://forum.shopware.com/u/oakrudi)\
**Post date:** [23. Februar 2016 um 11:48 UTC](https://forum.shopware.com/t/shopware-cart/34718/1 "2016-02-23T11:48:46Z")

</div>

Hey 🙂

Actually, when user changes currency, I loose all products from shoping cart. There are some way to replace values and currency at shopping cart every time user changes currency?

&nbsp;

Thanks.

---

<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:** [23. Februar 2016 um 12:30 UTC](https://forum.shopware.com/t/shopware-cart/34718/2 "2016-02-23T12:30:30Z")

</div>

Hi,

this is not default behaviour: Currency changes should not empty the cart. We do have such a behaviour for&nbsp; **shop** &nbsp;changes, however.

Perhaps a plugin is involved?

Best regards,

Daniel

---

<div class="post-metadata">

**Author:** ![oakrudi](https://avatars.discourse-cdn.com/v4/letter/o/779978/32.png) [@oakrudi](https://forum.shopware.com/u/oakrudi)\
**Post date:** [23. Februar 2016 um 17:34 UTC](https://forum.shopware.com/t/shopware-cart/34718/3 "2016-02-23T17:34:08Z")

</div>

In fact, exploring the application i’ve checked that a widget is responsible by currency change. The problem here, I think,&nbsp;is that each currency&nbsp;is a link to another “shopId” with different shop configurations.&nbsp;

Thanks.

---

<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:** [23. Februar 2016 um 17:46 UTC](https://forum.shopware.com/t/shopware-cart/34718/4 "2016-02-23T17:46:50Z")

</div>

Hi,

this is only the case for the subshop switch - not for the currency switch. Please compare with e.g.&nbsp;[http://www.shopwaredemo.co.uk/](http://www.shopwaredemo.co.uk/) - if I add an item to the cart (currency: pounds) and change to currency USD later, my cart will still be filled. So from your description I’d assume, that this is either a regression in the shopware version you are using - or a problem with a plugin.&nbsp;

Or did I get you wrong?

Best regards,

Daniel

&nbsp;

---

<div class="post-metadata">

**Author:** ![oakrudi](https://avatars.discourse-cdn.com/v4/letter/o/779978/32.png) [@oakrudi](https://forum.shopware.com/u/oakrudi)\
**Post date:** [23. Februar 2016 um 18:25 UTC](https://forum.shopware.com/t/shopware-cart/34718/5 "2016-02-23T18:25:27Z")

</div>

Note:  
-&nbsp;the application came to me in a mature state. So I’m at learning status for shopware, as starting to understand application business needs.  
-&nbsp;Shopware version is 5.0.3.

So, at&nbsp;backend 3 shops are created. And the user selects at frontend the proper currency. My links now are redirecting to another shopId that holds different currency. I believe that in&nbsp;&nbsp;[http://www.shopwaredemo.co.uk/](http://www.shopwaredemo.co.uk/)&nbsp;the shopId is the same.

I think that to „fix this“ right, I have to replace „shopId“ redirect by currency frontend plugin.

&nbsp;

Thanks by your help

---

<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:** [23. Februar 2016 um 18:51 UTC](https://forum.shopware.com/t/shopware-cart/34718/6 "2016-02-23T18:51:07Z")

</div>

Hi,

ah, I see. I guess in your case the previous developer either linked the currency-switch to a subshop-switch for some reason or they even created distinct currency-subshops and use the subshop-switch&nbsp;as a currency switch. That would explain your problems. Probably this was done, to link e.g. USD to another catalogue then EUR.

&nbsp;Actually its a bit hard to tell from&nbsp;here - but probably investing on how and why the subshop switch is performed is very promissing. Perhaps one of the „earlier“ project participants knows, why currency + shop are linked.

If it turns out, that you have to keep the subshop switch, the issue is the following: During subshop switch, the customer gets a new sessionID - so there is one session per subshop and customer. That’s the reason, why the basket is „lost“ (it’s still in the database)&nbsp;So you might end up „migrating“ the basket from the previous shop to the current shop. In that case, the „s\_order\_basket“ table would be, what you are looking for.

Best regards,

Daniel
