From 4bedd547f62f11bb8ab849696e4e281702577b83 Mon Sep 17 00:00:00 2001 From: Dainius Kaupaitis Date: Fri, 26 Feb 2016 21:24:35 +0200 Subject: [PATCH 1/2] =?UTF-8?q?[-]=20BO=20:=20Fixed=20bug=20while=20saving?= =?UTF-8?q?=20=E2=80=9ECustomer=20notications=E2=80=9C=20settings.=20?= =?UTF-8?q?=E2=80=9EOrder=20edit=E2=80=9C=20setting=20was=20ignored.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mailalerts.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mailalerts.php b/mailalerts.php index 5e30f1e..ef004e5 100644 --- a/mailalerts.php +++ b/mailalerts.php @@ -172,8 +172,12 @@ protected function postProcess() if (Tools::isSubmit('submitMailAlert')) { - if (!Configuration::updateValue('MA_CUSTOMER_QTY', (int)Tools::getValue('MA_CUSTOMER_QTY'))) + if ( + !Configuration::updateValue('MA_CUSTOMER_QTY', (int)Tools::getValue('MA_CUSTOMER_QTY')) || + !Configuration::updateValue('MA_ORDER_EDIT', (int)Tools::getValue('MA_ORDER_EDIT')) + ) { $errors[] = $this->l('Cannot update settings'); + } } else if (Tools::isSubmit('submitMAMerchant')) { From 70cac4a64ab06f7eeab812a80a0372822b8d9196 Mon Sep 17 00:00:00 2001 From: Dainius Kaupaitis Date: Fri, 26 Feb 2016 21:27:49 +0200 Subject: [PATCH 2/2] [-] BO : Fixed bug in MailAlerts::hookActionOrderEdited(). MA_ORDER_EDIT setting was ignored. --- mailalerts.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mailalerts.php b/mailalerts.php index ef004e5..864e7fd 100644 --- a/mailalerts.php +++ b/mailalerts.php @@ -848,8 +848,13 @@ public function hookActionOrderReturn($params) */ public function hookActionOrderEdited($params) { - if (!$this->order_edited || empty($this->order_edited)) + if ( + !$this->order_edited || + empty($this->order_edited) || + !Configuration::get('MA_ORDER_EDIT') + ) { return; + } $order = $params['order'];