# PDF generierung onOrder WICHTIG

**URL:** <https://forum.shopware.com/t/pdf-generierung-onorder-wichtig/17198>\
**Category:** Shopware 3.5\
**Tags:** programming\
**Created:** [5. Dezember 2013 um 12:34 UTC](https://forum.shopware.com/t/pdf-generierung-onorder-wichtig/17198 "2013-12-05T12:34:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![burg](https://avatars.discourse-cdn.com/v4/letter/b/3ab097/32.png) [@burg](https://forum.shopware.com/u/burg)\
**Post date:** [5. Dezember 2013 um 12:34 UTC](https://forum.shopware.com/t/pdf-generierung-onorder-wichtig/17198/1 "2013-12-05T12:34:51Z")

</div>

Hallo zusammen, bin auf der suche nach der lösung eine rechnungspdf einer neuen bestellung automatisiert zu erstellen. Gefunden habe ich diesen netten beispielplugin von shopware: [http://wiki.shopware.de/Beispiel-Plugin … \_per\_eMail](http://wiki.shopware.de/Beispiel-Plugins-Shopware-Developer-Schulung-%5C_detail%5C_572.html#Example%5C_8:%5C_PDF-Rechnung%5C_nach%5C_Bestellung%5C_per%5C_eMail) Leider funktioniert dieses beispiel bei mir nicht. Habe shopware 4 und folgenden error: ` PASSED VARIABLE IS NOT AN ARRAY OR OBJECT, USING EMPTY ARRAY INSTEAD IN SHOPWARE/COMPONENTS\DOCUMENT.PHP ON LINE 335 STACK TRACE: #0 Shopware/Components\Document.php(335): ArrayObject-\>\_\_construct(false) #1 Shopware/Components\Document.php(245): Shopware\_Components\_Document-\>loadConfiguration4x() #2 Shopware/Components\Document.php(217): Shopware\_Components\_Document-\>assignValues() #3 Shopware/Plugins\Community\Frontend\Example8\Bootstrap.php(46): Shopware\_Components\_Document-\>render() #4 Enlight\Event\Handler\Plugin.php(149): Shopware\_Plugins\_Frontend\_Example8\_Bootstrap::onOrder(Object(Enlight\_Hook\_HookArgs)) #5 Enlight\Event\EventManager.php(239): Enlight\_Event\_Handler\_Plugin-\>execute(Object(Enlight\_Hook\_HookArgs)) #6 Enlight\Hook\HookManager.php(177): Enlight\_Event\_EventManager-\>filter('sOrder::sSaveOr...', 21075, Object(Enlight\_Hook\_HookArgs)) #7 Shopware/Proxies\sOrderProxy.php(23): Enlight\_Hook\_HookManager-\>executeHooks(Object(Shopware\_Proxies\_sOrderProxy), 'sSaveOrder', Array) #8 Shopware/Controllers\Frontend\Checkout.php(574): Shopware\_Proxies\_sOrderProxy-\>sSaveOrder() #9 Shopware/Controllers\Frontend\Checkout.php(248): Shopware\_Controllers\_Frontend\_Checkout-\>saveOrder() #10 Enlight\Controller\Action.php(135): Shopware\_Controllers\_Frontend\_Checkout-\>finishAction() #11 Enlight\Controller\Dispatcher\Default.php(521): Enlight\_Controller\_Action-\>dispatch('finishAction') #12 Enlight\Controller\Front.php(214): Enlight\_Controller\_Dispatcher\_Default-\>dispatch(Object(Enlight\_Controller\_Request\_RequestHttp), Object(Enlight\_Controller\_Response\_ResponseHttp)) #13 Shopware/Bootstrap.php(79): Enlight\_Controller\_Front-\>dispatch() #14 Enlight\Application.php(192): Shopware\_Bootstrap-\>run() #15 shopware.php(74): Enlight\_Application-\>run() #16 {main} ` ich hoffe mir kann jemand helfen!

---

<div class="post-metadata">

**Author:** ![burg](https://avatars.discourse-cdn.com/v4/letter/b/3ab097/32.png) [@burg](https://forum.shopware.com/u/burg)\
**Post date:** [5. Dezember 2013 um 13:31 UTC](https://forum.shopware.com/t/pdf-generierung-onorder-wichtig/17198/2 "2013-12-05T13:31:50Z")

</div>

Ok es lag am $typ … im tutorial wird 0 weiter gegeben mit 2 für rechnung funktioniert die erstellung… zu finden im controller backend document.
