# \[GELÖST\] SW - Pluginsystem 5.2 Shopware\_Components\_Document::initDocument

**URL:** https://forum.shopware.com/t/gelost-sw-pluginsystem-5-2-shopware-components-document-initdocument/47380
**Category:** Programmierung
**Created:** [7. August 2017 um 21:14 UTC](https://forum.shopware.com/t/gelost-sw-pluginsystem-5-2-shopware-components-document-initdocument/47380 "2017-08-07T21:14:03Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![sschreier](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/sschreier/32/23296_2.png) [@sschreier](https://forum.shopware.com/u/sschreier)
#### Post date: [7. August 2017 um 21:14 UTC](https://forum.shopware.com/t/gelost-sw-pluginsystem-5-2-shopware-components-document-initdocument/47380/1 "2017-08-07T21:14:03Z")

</div>

Hallo alle,

bei der Nutzung von Shopware\_Components\_Document::initDocument im neuen Pluginsystem kommt folgende Fehlermeldung:

```
Fatal error: Class 'MyPlugin\Shopware_Components_Document' not found ...

```

Hat jemand einen Lösungsansatz? use Shopware\Models\Order\Document\Document hat nichts bewirkt.

Beste Grüße

Sebastian

---

<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: [7. August 2017 um 21:21 UTC](https://forum.shopware.com/t/gelost-sw-pluginsystem-5-2-shopware-components-document-initdocument/47380/2 "2017-08-07T21:21:03Z")

</div>

Du musst in den global namespace: \Shopware\_Components\_Document::init()

Viele Grüße  
[https://www.digitvision.de](https://www.digitvision.de)

---

<div class="post-metadata">

### Author: ![sschreier](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/sschreier/32/23296_2.png) [@sschreier](https://forum.shopware.com/u/sschreier)
#### Post date: [7. August 2017 um 21:24 UTC](https://forum.shopware.com/t/gelost-sw-pluginsystem-5-2-shopware-components-document-initdocument/47380/3 "2017-08-07T21:24:24Z")

</div>

Hallo Aquatuning,

das versteh ich jetzt grad nicht wirklich. Wie mache ich das?

Ich geb ja in meinem Controller (Controller.php) einen jeweiligen eigenen Namespace an (beispielsweise: namespace MyPlugin\Subscriber; ). Wie erweitere ich den für die genannte Funktion? Hast du vielleicht wieder einen Tipp aus deiner großen Wühlkiste ^^?

Ich hab es auch schon in der Hauptdatei versucht, gleicher Fehler.

Beste Grüße

Sebastian

---

<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: [7. August 2017 um 21:52 UTC](https://forum.shopware.com/t/gelost-sw-pluginsystem-5-2-shopware-components-document-initdocument/47380/4 "2017-08-07T21:52:51Z")

</div>

Siehe den \ vor dem Namen der Klasse 🙂  
Oder nutze ein use&nbsp;Shopware\_Components\_Document um die Klasse in deinen namespace zu bekommen.

Viele Grüße

---

<div class="post-metadata">

### Author: ![sschreier](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/sschreier/32/23296_2.png) [@sschreier](https://forum.shopware.com/u/sschreier)
#### Post date: [7. August 2017 um 22:03 UTC](https://forum.shopware.com/t/gelost-sw-pluginsystem-5-2-shopware-components-document-initdocument/47380/5 "2017-08-07T22:03:44Z")

</div>

Hallo Aquatuning,

use Shopware\_Components\_Document; war natürlich des Rätsels Lösung. Manchmal ist es vielleicht zu spät für solche Fragen, da hätte ich aber auch selbst drauf kommen können ![Grin](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/70033cde8e8ff79cfa538293ae71318d6f788423.png "Grin"). Ich danke dir aber vielmals für den Tipp.

Beste Grüße

Sebastian
