diff --git a/Bootstrap.php b/Bootstrap.php index 5270a85..39420b9 100644 --- a/Bootstrap.php +++ b/Bootstrap.php @@ -37,7 +37,8 @@ public function boot(Dispatcher $dispatcher): void parent::boot($dispatcher); if (!Shop::isFrontend()) { - if ($authorized = Shop::Container()->getDB()->executeQuery('SELECT kId FROM xplugin_ws5_mollie_orders WHERE cStatus = "authorized" AND dCreated > DATE_SUB(NOW(), INTERVAL 30 DAY)', ReturnType::AFFECTED_ROWS)) { + $notificationSetting = self::Plugin('ws5_mollie')->getConfig()->getValue("notifications"); + if (in_array($notificationSetting, ['Y', 'A']) && $authorized = Shop::Container()->getDB()->executeQuery('SELECT kId FROM xplugin_ws5_mollie_orders WHERE cStatus = "authorized" AND dCreated > DATE_SUB(NOW(), INTERVAL 30 DAY)', ReturnType::AFFECTED_ROWS)) { Notification::getInstance()->add( NotificationEntry::TYPE_WARNING, 'Mollie Authorized Orders', @@ -46,7 +47,7 @@ public function boot(Dispatcher $dispatcher): void ); } - if ($errors = Shop::Container()->getDB()->executeQuery('SELECT kId FROM xplugin_ws5_mollie_queue WHERE cError IS NOT NULL AND dCreated > DATE_SUB(NOW(), INTERVAL 30 DAY);', ReturnType::AFFECTED_ROWS)) { + if (in_array($notificationSetting, ['Y', 'Q']) && $errors = Shop::Container()->getDB()->executeQuery('SELECT kId FROM xplugin_ws5_mollie_queue WHERE cError IS NOT NULL AND dCreated > DATE_SUB(NOW(), INTERVAL 30 DAY);', ReturnType::AFFECTED_ROWS)) { Notification::getInstance()->add( NotificationEntry::TYPE_DANGER, 'Mollie Queue with Errors', diff --git a/info.xml b/info.xml index 2d86d2f..396957a 100644 --- a/info.xml +++ b/info.xml @@ -7,8 +7,8 @@ 102 5.0.0 ws5_mollie - 2021-12-06 - 1.3.4 + 2022-05-03 + 1.3.5 689388c6-9f04-4648-b516-e67d96b0dc1d @@ -197,6 +197,19 @@ + + Mitteilungen (Glocke) + + + notifications + + + + + + + + @@ -694,6 +707,15 @@ + + PUI Daten übergeben + Macht den Auftrag in der WAWI ReadOnly. + usePUI + + + + + Gültigkeit in Tagen Wie lange hat der Kunde Zeit die Überweisung zu tätigen? diff --git a/paymentmethod/Banktransfer.php b/paymentmethod/Banktransfer.php index 9d4efeb..0151d43 100644 --- a/paymentmethod/Banktransfer.php +++ b/paymentmethod/Banktransfer.php @@ -22,6 +22,11 @@ class Banktransfer extends PaymentMethod public function generatePUI(AbstractCheckout $checkout): string { + + if(self::Plugin('ws5_mollie')->getConfig()->getValue($this->moduleID . '_usePUI') === 'N'){ + return false; + } + $template = self::Plugin('ws5_mollie')->getLocalization()->getTranslation('banktransferPUI'); return str_replace(