# Plugin-Konfiguration manuell speichern

**URL:** <https://forum.shopware.com/t/plugin-konfiguration-manuell-speichern/43387>\
**Category:** Programmierung\
**Created:** [3. Februar 2017 um 13:17 UTC](https://forum.shopware.com/t/plugin-konfiguration-manuell-speichern/43387 "2017-02-03T13:17:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cube1893](https://avatars.discourse-cdn.com/v4/letter/c/9f8e36/32.png) [@cube1893](https://forum.shopware.com/u/cube1893)\
**Post date:** [3. Februar 2017 um 13:17 UTC](https://forum.shopware.com/t/plugin-konfiguration-manuell-speichern/43387/1 "2017-02-03T13:17:16Z")

</div>

Hallo, Konfigurationen eines Plugins kann man mit

```
Shopware()->Config()->getByNamespace('namespace', 'attribut_xyz')

```

auslesen. Gibt es auch eine Möglichkeit, die Attribute manuell zu setzen? Und zwar elegant und nicht mit einem handgestrickten Query. Es gibt ja den ConfigWriter, der ist aber eher für die Installation gedacht. Ich möchte ein Plugin-Config-Wert zu einem beliebigen Zeitpunkt verändern und speichern.

Hat jemand einen Rat? Danke.

---

<div class="post-metadata">

**Author:** ![natertec](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@natertec](https://forum.shopware.com/u/natertec)\
**Post date:** [30. April 2017 um 22:22 UTC](https://forum.shopware.com/t/plugin-konfiguration-manuell-speichern/43387/2 "2017-04-30T22:22:05Z")

</div>

Hast du mittlerweile eine Lösung gefunden? Ich stehe vor dem gleichen Problem und wäre für Tipps dankbar.

---

<div class="post-metadata">

**Author:** ![team2](https://avatars.discourse-cdn.com/v4/letter/t/c5a1d2/32.png) [@team2](https://forum.shopware.com/u/team2)\
**Post date:** [2. Mai 2017 um 11:56 UTC](https://forum.shopware.com/t/plugin-konfiguration-manuell-speichern/43387/3 "2017-05-02T11:56:31Z")

</div>

Ich benutze immer das:

```
$shop = Shopware()->Models()->getRepository('Shopware\Models\Shop\Shop')->findOneBy(array('default' => true));
$pluginManager = Shopware()->Container()->get('shopware_plugininstaller.plugin_manager');
$plugin = $pluginManager->getPluginByName('Pluginname');
$pluginManager->saveConfigElement($plugin, 'VARIABLE', 'WERT', $shop);

```

&nbsp;
