# SalesChannelContext Configuration Switch für Lieferland / countryId

**URL:** <https://forum.shopware.com/t/saleschannelcontext-configuration-switch-fuer-lieferland-countryid/94310>\
**Category:** Shopware 6 (German)\
**Created:** [10. Mai 2022 um 09:02 UTC](https://forum.shopware.com/t/saleschannelcontext-configuration-switch-fuer-lieferland-countryid/94310 "2022-05-10T09:02:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SebastianStrube](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@SebastianStrube](https://forum.shopware.com/u/SebastianStrube)\
**Post date:** [10. Mai 2022 um 09:02 UTC](https://forum.shopware.com/t/saleschannelcontext-configuration-switch-fuer-lieferland-countryid/94310/1 "2022-05-10T09:02:34Z")

</div>

Hallo,

ich versuche einem nicht eingeloggten Nutzer (ohne Warenkorb) in der Storefront die Auswahl eines Lieferlandes außerhalb des Warenkorbes zu ermöglichen.

Das mache ich über ein Formular mit einem POST Request auf die Route /checkout/configure. Das ist dieselbe Route die im Warenkorb die Änderung des Lieferlandes ermöglicht bevor(!) der Nutzer eingeloggt ist (aber eben MIT Warenkorb).

In meinem POST Request gebe ich neben dem CSRF Token noch Redirect Parameter mit. Dieser „Proof of Concept“ funktioniert perfekt wenn der Shop im `dev` Environment läuft. Sobald ich das Environment auf `prod` stelle, vermischen sich Kontexte verschiedener Sessions / User und der Switch der `countryId` funktioniert auch nicht mehr sofort sondern nur noch zuverlässig wenn der User einen Warenkorb hat.

Ich vermute das Shopware die Auswahl nicht korrekt in die Cache Konfiguration aufnimmt, denn in der Dokumentation: [https://developer.shopware.com/docs/concepts/framework/http\_cache](https://developer.shopware.com/docs/concepts/framework/http_cache) ist für den Switch der Currency explizit die Rede davon das ein `sw-currency` Cookie für nicht eingeloggte Nutzer ohne Warenkorb gesetzt wird.

Laut `Shopware\Core\System\SalesChannel\SalesChannel\AbstractContextSwitchRoute` ist der von mir verwendete Parameter aber explizit erlaubt:

```auto
 * This route allows changing configurations inside the context.
 * Following parameters are allowed to change: "currencyId", "languageId", "billingAddressId", "shippingAddressId",
 * "paymentMethodId", "shippingMethodId", "countryId" and "countryStateId"

```

**Also zusammengefasst: Im prod Environment funktioniert der countryId Switch für den SalesChannelContext eines nicht eingeloggten Nutzers NUR in Verbindung mit einem Warenkorb.**

Hat jemand eine Idee?
