BackendArticleSubscriber

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

package

Default

Methods

getSubscribedEvents

getSubscribedEvents() 
static
inheritdoc

Adds the custom article detail fields to the response data.

onAfterDetailListAction(\Enlight_Hook_HookArgs $args) 

Arguments

$args

\Enlight_Hook_HookArgs

Adds the custom article detail fields to the response data.

onAfterGetArticleData(\Enlight_Hook_HookArgs $args) 

Arguments

$args

\Enlight_Hook_HookArgs

Saves the custom article detail fields, in case the main action succeeded, and adds the updated custom fields to the response data.

onAfterSaveAction(\Enlight_Hook_HookArgs $args) 

Arguments

$args

\Enlight_Hook_HookArgs

Saves the custom variant article detail fields, in case the main action succeeded, and adds the updated custom fields to the response data.

onAfterSaveDetailAction(\Enlight_Hook_HookArgs $args) 

Arguments

$args

\Enlight_Hook_HookArgs

Checks whether the request contains a 'mainDetail' but no 'id', which indicates the creation of a new article, and, if it does, sets the 'inStock' field to 0 to prevent NULL values in the database.

onBeforeSaveAction(\Enlight_Hook_HookArgs $args) 

Arguments

$args

\Enlight_Hook_HookArgs

Since the 'inStock' and 'minStock' values are managed by Pickware ERP and saved independently from the rest of an article's data, this hook removes these values from the main detail data, before an article is saved.

onBeforeSaveArticle(\Enlight_Hook_HookArgs $args) 

Please note, that it is fine to remove the 'inStock' and 'stockMin' values in any case even when a new article is created, since it is not possible to edit these values via the Shopware Backend before an article has been saved at least once. This is due to some backend UI manipulations done by the Pickware ERP plugin.

Arguments

$args

\Enlight_Hook_HookArgs

Since the 'inStock' and 'stockMin' values are managed by Pickware ERP and saved independently from the rest of an article detail's data, this hook removes these values from the detail data, before an article detail is saved.

onBeforeSaveDetail(\Enlight_Hook_HookArgs $args) 

Please note, that it is fine to remove the 'inStock' and 'stockMin' values in any case even when a new article detail is created, since it is not possible to edit these values via the Shopware Backend before an article details has been saved at least once. This is due to some backend UI manipulations done by the Pickware ERP plugin.

Arguments

$args

\Enlight_Hook_HookArgs

Constants

ATTRIBUTE

ATTRIBUTE