DocumentComponentSubscriber

Extends \Shopware\Plugins\ViisonCommon\Classes\Subscribers\Base

package

Default

Methods

getSubscribedEvents

getSubscribedEvents() 
static
see \Shopware\Plugins\ViisonCommon\Classes\Subscribers\Base::getSubscribedEvents()

Does one of the following:

onAfterAssignValues(\Enlight_Hook_HookArgs $args) 

a) Fixes the document number for cancellation Invoice documents and the referenced invoice number b) Modifies the template variables for pick list documents c) Modifies the template variables for supplier order preview documents (demo data).

Arguments

$args

\Enlight_Hook_HookArgs

Checks the plugin config for any invoice archive email addresses and, if configured and the document that was rendered is an invoice or cancellation invoice PDF, sends the document file to all archive addresses.

onAfterRender(\Enlight_Hook_HookArgs $args) 

Arguments

$args

\Enlight_Hook_HookArgs

In order to be able to create multiple documents of the same type for one single order, this method sets the user id of the existing order documents to -1. This will influence the hooked saveDocument method in a way, that it will create a new document instead of overwriting the existing one. The modification of these order documents will be reverted after saveDocument has finished, thus in this class' onAfterDocumentSaveDocument method.

onBeforeSaveDocument(\Enlight_Hook_HookArgs $args) 

Arguments

$args

\Enlight_Hook_HookArgs