diff --git a/mailalerts.php b/mailalerts.php index 5e30f1e..864e7fd 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')) { @@ -844,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'];