Skip to content

Commit

Permalink
Merge pull request #20 from Endereco/S5P-13-falsche-doaccountings-ums…
Browse files Browse the repository at this point in the history
…etzung

S5P-13: falsche doaccountings umsetzung
  • Loading branch information
iljamobilemojo authored May 10, 2021
2 parents 27a7e07 + 3125878 commit d002e59
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 16 deletions.
39 changes: 24 additions & 15 deletions Subscriber/Frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,40 @@ public static function getSubscribedEvents()
return [
'Theme_Inheritance_Template_Directories_Collected' => 'onCollectTemplateDir',

'Shopware\Models\Customer\Address::postPersist' => 'onPostPersist',
'Shopware\Models\Customer\Address::postUpdate' => 'onPostUpdate',

'Enlight_Controller_Action_PostDispatchSecure_Frontend' => 'onPostDispatch',
'Enlight_Controller_Action_PostDispatchSecure_Backend_Config' => 'onPostDispatchConfig',

'Enlight_Controller_Action_PostDispatchSecure_Frontend_Register' => 'sendDoAccountingRegister',
'Enlight_Controller_Action_PostDispatchSecure_Frontend_Address' => 'sendDoAccountingAddress',
'Enlight_Controller_Action_PostDispatchSecure_Frontend_Forms' => 'sendDoAccountingForms',

'Enlight_Controller_Action_PostDispatchSecure_Frontend_Account' => 'checkExistingCustomerAddresses',
'Enlight_Controller_Action_PostDispatchSecure_Frontend_Checkout' => 'checkAdressesOrOpenModals',

'Shopware_Modules_Order_SaveOrder_FilterAttributes' => 'onAfterOrderSaveOrder',
];
}

public function sendDoAccountingForms($args) {
$this->_doAccounting();
}

public function sendDoAccountingRegister($args) {
$request = $args->getRequest();
$blackListActions = [
'ajax_validate_password',
'ajax_validate_email'
];
if (in_array($request->getActionName(), $blackListActions)) {
return;
}
$this->_doAccounting();
}

public function sendDoAccountingAddress($args) {
$this->_doAccounting();
}

public function onAfterOrderSaveOrder($args) {
$sOrder = $args->get('subject');
$returnValue = $args->getReturn();
Expand Down Expand Up @@ -239,18 +260,6 @@ public function checkExistingCustomerAddresses($args) {
}
}

public function onPostPersist($args) {
$this->_doAccounting();
}

public function onPostUpdate($args) {
$this->_doAccounting();
}

public function onPreRemove($args) {
$this->_doAccounting();
}

public function onPostDispatchConfig(\Enlight_Event_EventArgs $args)
{
/** @var Shopware_Controllers_Backend_Config $subject */
Expand Down
19 changes: 18 additions & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<label lang="en">Endereco Address-Services for Shopware (Download)</label>
<label lang="de">Endereco Adress-Services für Shopware (Download)</label>

<version>3.5.5</version>
<version>3.5.6</version>

<link>https://www.endereco.de/shopware</link>

Expand All @@ -31,6 +31,23 @@

<logo>/custom/plugins/EnderecoShopware5Client/logo.png</logo>

<changelog version="3.5.6">
<changes lang="de">
<![CDATA[
<ul>
<li><a href="https://github.com/Endereco/endereco-shopware5-client/issues/19">Issue #19</a> Fix für "Falsche doAccounting Umsetzung".</li>
</ul>
]]>
</changes>
<changes lang="en">
<![CDATA[
<ul>
<li><a href="https://github.com/Endereco/endereco-shopware5-client/issues/19">Issue #19</a> Fix for "Wrong doAccounting implementation".</li>
</ul>
]]>
</changes>
</changelog>

<changelog version="3.5.5">
<changes lang="de">
<![CDATA[
Expand Down

0 comments on commit d002e59

Please sign in to comment.