# Theme, wie bekomme ich die sales channel id?

**URL:** <https://forum.shopware.com/t/theme-wie-bekomme-ich-die-sales-channel-id/98611>\
**Category:** Shopware 6 (German)\
**Created:** [19. Februar 2023 um 12:43 UTC](https://forum.shopware.com/t/theme-wie-bekomme-ich-die-sales-channel-id/98611 "2023-02-19T12:43:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![brettvormkopp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/brettvormkopp/32/7788_2.png) [@brettvormkopp](https://forum.shopware.com/u/brettvormkopp)\
**Post date:** [19. Februar 2023 um 12:43 UTC](https://forum.shopware.com/t/theme-wie-bekomme-ich-die-sales-channel-id/98611/1 "2023-02-19T12:43:19Z")

</div>

Ich habe in SW6 zwei Verkaufskanäle, einmal für DE und CH. Beide haben das gleiche Theme zugewiesen,  
Wie kann ich die beiden im Theme unterscheiden? Wie ist die Variable für saleschannelid?  
Danke und Gruss

---

<div class="post-metadata">

**Author:** ![brettvormkopp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/brettvormkopp/32/7788_2.png) [@brettvormkopp](https://forum.shopware.com/u/brettvormkopp)\
**Post date:** [19. Februar 2023 um 18:37 UTC](https://forum.shopware.com/t/theme-wie-bekomme-ich-die-sales-channel-id/98611/2 "2023-02-19T18:37:06Z")

</div>

Antwort an mich selbst  
context.salesChannel.id

---

<div class="post-metadata">

**Author:** ![AlexBS](https://avatars.discourse-cdn.com/v4/letter/a/ed655f/32.png) [@AlexBS](https://forum.shopware.com/u/AlexBS)\
**Post date:** [20. Februar 2023 um 13:44 UTC](https://forum.shopware.com/t/theme-wie-bekomme-ich-die-sales-channel-id/98611/3 "2023-02-20T13:44:11Z")

</div>

Am besten deinen letzten Post gleich als Lösung markieren.

---

<div class="post-metadata">

**Author:** ![shopsono](https://avatars.discourse-cdn.com/v4/letter/s/5fc32e/32.png) [@shopsono](https://forum.shopware.com/u/shopsono)\
**Post date:** [23. Februar 2024 um 11:13 UTC](https://forum.shopware.com/t/theme-wie-bekomme-ich-die-sales-channel-id/98611/4 "2024-02-23T11:13:16Z")

</div>

Hallo kannst du mir bitte kurz deine Lösung erklären ? 🙂 Wir haben auch 2 Verkaufskanäle und jetzt habe ich eine Templateanpassung gemacht, diese soll aber nur für einen Shop gültig sein. Sprich ich benötige hierzu die sales\_channel-id und diese finde ich nicht. schöne grüße

---

<div class="post-metadata">

**Author:** ![brettvormkopp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/brettvormkopp/32/7788_2.png) [@brettvormkopp](https://forum.shopware.com/u/brettvormkopp)\
**Post date:** [28. Februar 2024 um 18:52 UTC](https://forum.shopware.com/t/theme-wie-bekomme-ich-die-sales-channel-id/98611/5 "2024-02-28T18:52:48Z")

</div>

@shopsono  
Der Saleschannel steht in der Datenbank unter:  
sales\_channel\_domain guckste nach der dazugehörigen domain. dann nimmst du das Feld „id“ und machst vorn „0x“ weg, das ist dann deine saleschannelid.

Und dann im template:  
`{% if context.salesChannel.id == 'c12cee1079504c1cad8d764644e39123' %}123{% endif %}`

---

<div class="post-metadata">

**Author:** ![siebi](https://avatars.discourse-cdn.com/v4/letter/s/f9ae1b/32.png) [@siebi](https://forum.shopware.com/u/siebi)\
**Post date:** [29. Februar 2024 um 12:39 UTC](https://forum.shopware.com/t/theme-wie-bekomme-ich-die-sales-channel-id/98611/6 "2024-02-29T12:39:51Z")

</div>

Oder etwas einfacher im Link des Sales-Chanels im Admin:  
[https://xxx/admin#/sw/sales/channel/detail/018d803653f37f50b797f7c768717092/base](https://xxx/admin#/sw/sales/channel/detail/018d803653f37f50b797f7c768717092/base)
