# Plugin: Inhalt vom Konfigurations Formular auslesen

**URL:** <https://forum.shopware.com/t/plugin-inhalt-vom-konfigurations-formular-auslesen/11466>\
**Category:** Shopware 3.5\
**Tags:** programming\
**Created:** [7. Februar 2013 um 17:53 UTC](https://forum.shopware.com/t/plugin-inhalt-vom-konfigurations-formular-auslesen/11466 "2013-02-07T17:53:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jfichtel](https://avatars.discourse-cdn.com/v4/letter/j/3e96dc/32.png) [@jfichtel](https://forum.shopware.com/u/jfichtel)\
**Post date:** [7. Februar 2013 um 17:53 UTC](https://forum.shopware.com/t/plugin-inhalt-vom-konfigurations-formular-auslesen/11466/1 "2013-02-07T17:53:07Z")

</div>

Hallo ich habe ein Plugin erstellt, welches auch noch ein paar Formulardaten hat, die in den Grundeinstellungen gepflegt werden. Aber ich komme nicht an die Inhalte. Ich habe einfach mal in meinem Frontend Controller das hier aufgerufen: ` var\_dump( Shopware()-\>Plugins()-\>Frontend()-\>Idealnewsflat()-\>Config() ); ` Das ergibt dann folgenden Fehler: [quote] Ups! Ein Fehler ist aufgetreten! Die nachfolgenden Hinweise sollten Ihnen weiterhelfen. Plugin “Idealnewsflat” not found failure in Enlight/Plugin/PluginCollection.php on line 113 Stack trace: #0 Enlight/Plugin/Namespace/Config.php(102): Enlight\_Plugin\_PluginCollection-\>load(‘Idealnewsflat’, true) #1 Enlight/Plugin/PluginCollection.php(97): Enlight\_Plugin\_Namespace\_Config-\>load(‘Idealnewsflat’, true) #2 Enlight/Plugin/PluginCollection.php(127): Enlight\_Plugin\_PluginCollection-\>get(‘Idealnewsflat’, true) #3 Shopware/Plugins/Community/Frontend/idealnewsflat/Controllers/Frontend/Idealnewsflat.php(20): Enlight\_Plugin\_PluginCollection-\>\_\_call(‘Idealnewsflat’, Array) #4 Shopware/Plugins/Community/Frontend/idealnewsflat/Controllers/Frontend/Idealnewsflat.php(20): Shopware\_Components\_Plugin\_Namespace-\>Idealnewsflat() #5 Enlight/Controller/Action.php(135): Shopware\_Controllers\_Frontend\_Idealnewsflat-\>indexAction() #6 Enlight/Controller/Dispatcher/Default.php(521): Enlight\_Controller\_Action-\>dispatch(‘indexAction’) #7 Enlight/Controller/Front.php(214): Enlight\_Controller\_Dispatcher\_Default-\>dispatch(Object(Enlight\_Controller\_Request\_RequestHttp), Object(Enlight\_Controller\_Response\_ResponseHttp)) #8 Shopware/Bootstrap.php(79): Enlight\_Controller\_Front-\>dispatch() #9 Enlight/Application.php(192): Shopware\_Bootstrap-\>run() #10 shopware.php(74): Enlight\_Application-\>run() #11 {main} [/quote] Das Plugin hat aber den Namen, weil ich es in der Bootstrap doch hiermit declariere: ` public function getLabel() { return "Idealnewsflat"; } ` Was könnte ich verbaselt haben? Vielen Dank1

---

<div class="post-metadata">

**Author:** ![jfichtel](https://avatars.discourse-cdn.com/v4/letter/j/3e96dc/32.png) [@jfichtel](https://forum.shopware.com/u/jfichtel)\
**Post date:** [8. Februar 2013 um 09:33 UTC](https://forum.shopware.com/t/plugin-inhalt-vom-konfigurations-formular-auslesen/11466/2 "2013-02-08T09:33:57Z")

</div>

Ich sehe gerade, dass ich das hier aufgeschnappt habe: [http://wiki.shopware.de/Die-Shopware-Pl … l\_760.html](http://wiki.shopware.de/Die-Shopware-Plugin-Konfiguration%5C_detail%5C_760.html) Das ist eine SW 3.x Doku - ist das noch aktuell oder gibt es SW 4.x betreffend etwas anderes?

---

<div class="post-metadata">

**Author:** ![bluewolf](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/bluewolf/32/7886_2.png) [@bluewolf](https://forum.shopware.com/u/bluewolf)\
**Post date:** [8. Februar 2013 um 09:51 UTC](https://forum.shopware.com/t/plugin-inhalt-vom-konfigurations-formular-auslesen/11466/3 "2013-02-08T09:51:19Z")

</div>

Hallo, Anleitungen gibt es hier: [wiki.shopware.de/Frontend\_cat\_870.html](http://wiki.shopware.de/Frontend%5C_cat%5C_870.html) Du braucht folgenden Code in der Bootstap.php: ` public function onPostDispatch(Enlight\_Event\_EventArgs $args) { $request = $args-\>getSubject()-\>Request(); $response = $args-\>getSubject()-\>Response(); $view = $args-\>getSubject()-\>View(); $view-\>addTemplateDir($this-\>Path() . '/views/'); if (!$request-\>isDispatched() || $response-\>isException() || $request-\>getModuleName() != 'frontend') { return; } $config = $this-\>Config(); $view-\>variable1 = $config-\>variable1; $view-\>variable2 = $config-\>variable2; $view-\>variable3 = $config-\>variable3; ... //\* Hier alle Variablen übergeben \*/ $view-\>filePath = $this-\>Path() . '/views/'; ... $view -\> extendsTemplate('frontend/plugins/dein\_Plugin/template.tpl'); return; }`

---

<div class="post-metadata">

**Author:** ![jfichtel](https://avatars.discourse-cdn.com/v4/letter/j/3e96dc/32.png) [@jfichtel](https://forum.shopware.com/u/jfichtel)\
**Post date:** [8. Februar 2013 um 12:01 UTC](https://forum.shopware.com/t/plugin-inhalt-vom-konfigurations-formular-auslesen/11466/4 "2013-02-08T12:01:32Z")

</div>

Vielen Dank, das hat funktioniert! 🙂
