# plugin configuration für Subshop/Sprachshop (config.xml:  scope="shop/locale")

**URL:** <https://forum.shopware.com/t/plugin-configuration-fur-subshop-sprachshop-config-xml-scope-shop-locale/49981>\
**Category:** Programmierung\
**Created:** [12. Dezember 2017 um 13:54 UTC](https://forum.shopware.com/t/plugin-configuration-fur-subshop-sprachshop-config-xml-scope-shop-locale/49981 "2017-12-12T13:54:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_chuuuing](https://avatars.discourse-cdn.com/v4/letter/_/dec6dc/32.png) [@\_chuuuing](https://forum.shopware.com/u/_chuuuing)\
**Post date:** [12. Dezember 2017 um 13:54 UTC](https://forum.shopware.com/t/plugin-configuration-fur-subshop-sprachshop-config-xml-scope-shop-locale/49981/1 "2017-12-12T13:54:17Z")

</div>

unter neue Shopware Version ist eine&nbsp;option ‘scope’ verfügbar in CustomPlugin/Resources/config.xml

Offizielle Tutorial finde ich leider&nbsp;nur ein satz:&nbsp;[Plugin configuration](https://developers.shopware.com/developers-guide/plugin-configuration/#scope)

mein Code:

```
          SGENewsletterContent
          Inhalt:
          Content:
          Die eingegebene Inhalt wird in Popup Fenster angezeigt.

```

ich möchte eine von folgendes realisieren:

- html filed mit ein&nbsp;“Erde” Zeichen wie in Textbausteine&nbsp;[http://community.shopware.com/Textbausteine\_detail\_1165.html](http://community.shopware.com/Textbausteine_detail_1165.html)&nbsp; &nbsp;\>&nbsp; soweit finde ich keine Lösung

- verschiedene Tabs in Plugin’s Konfiguration, damit man für jede Shop etwas eigene Inhalt anpassen kann. etwas ähnlich wie hier:&nbsp;[https://forum.shopware.com/discussion/comment/203576/#Comment\_203576](https://forum.shopware.com/discussion/comment/203576/#Comment_203576)

Hat jmd. vielleicht Idee?

Vielen Dank

---

<div class="post-metadata">

**Author:** ![\_chuuuing](https://avatars.discourse-cdn.com/v4/letter/_/dec6dc/32.png) [@\_chuuuing](https://forum.shopware.com/u/_chuuuing)\
**Post date:** [12. Dezember 2017 um 15:24 UTC](https://forum.shopware.com/t/plugin-configuration-fur-subshop-sprachshop-config-xml-scope-shop-locale/49981/2 "2017-12-12T15:24:00Z")

</div>

[Q & A]

Antwort gefunden… Wenn jmd. auch etwas ähnlich gesucht hat. Als Reference gebe ich hier meine Lösung aus:

meine Verständnisse über “scope”:

- scope=“locale”: alle gleich. Keine Unterschied

- scope=“shop”: die Konfigurations für Hauptshop und Sprachshop(oder Subshop) sind alle getrennt&nbsp;und werden nach der erfolgreichen Einstellung einer Sprachshop(Subshop) in Plugin Manager\>CustomPlugin\>Konfiguration angezeigt

 ![](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/2X/4/4466259510db15bcbbb1cd1abba603f5d1af270a.png)

(Tutorial für Sprachshop: [http://community.shopware.com/\_detail\_911.html](http://community.shopware.com/_detail_911.html))

(die “en\_shop” kommt aus Einstellung/Grundeinstellung/Shopeinstellung/Shops \> Sprachshop \> eingegebene “Name”)

---

<div class="post-metadata">

**Author:** ![tashfeen](https://avatars.discourse-cdn.com/v4/letter/t/b782af/32.png) [@tashfeen](https://forum.shopware.com/u/tashfeen)\
**Post date:** [11. April 2018 um 13:14 UTC](https://forum.shopware.com/t/plugin-configuration-fur-subshop-sprachshop-config-xml-scope-shop-locale/49981/3 "2018-04-11T13:14:01Z")

</div>

I have a main\_shop with the name „English“ and a language shop „German“ which has the main shop as „English“. In my config.xml for plugin I create a configuration with scope=„shop“. But when I switch the shop language to German and call the configuration in my FrontendSubscriber method the controller doesn’t automatically reads the right configuration. It only reads the configuration of the main shop i-e „English“. Have you faced such problem?&nbsp; Can you help me ? Below is my relevant code.

Config.xml]

> \<?xml version="1.0" encoding="utf-8"?\> videoLink Video Url Video Url

&nbsp;

FrontendSubscriberMethod

> //Get configuration $config = $controller-\>get(‚shopware.plugin.cached\_config\_reader‘)-\>getByPluginName(‚PluginName‘); //Fetch url from configuration $videoLink = $config[‚videoLink‘];

This video link always gives the configuration of the main shop

---

<div class="post-metadata">

**Author:** ![EikeBrandtWarneke](https://avatars.discourse-cdn.com/v4/letter/e/cdc98d/32.png) [@EikeBrandtWarneke](https://forum.shopware.com/u/EikeBrandtWarneke)\
**Post date:** [11. April 2018 um 13:55 UTC](https://forum.shopware.com/t/plugin-configuration-fur-subshop-sprachshop-config-xml-scope-shop-locale/49981/4 "2018-04-11T13:55:51Z")

</div>

Have a look at the second parameter of getPluginByName()

kind regards&nbsp;

---

<div class="post-metadata">

**Author:** ![ahmadsaad](https://avatars.discourse-cdn.com/v4/letter/a/65b543/32.png) [@ahmadsaad](https://forum.shopware.com/u/ahmadsaad)\
**Post date:** [11. April 2018 um 16:50 UTC](https://forum.shopware.com/t/plugin-configuration-fur-subshop-sprachshop-config-xml-scope-shop-locale/49981/5 "2018-04-11T16:50:39Z")

</div>

Hallo&nbsp;

```
$config = $controller->get('shopware.plugin.cached_config_reader')->getByPluginName('PluginName', Shopware()->Shop() );

```

VG,

Ahmad
