diff --git a/modules/mailalerts/mailalerts.php b/modules/mailalerts/mailalerts.php index 5d7260499..ef5ce679b 100644 --- a/modules/mailalerts/mailalerts.php +++ b/modules/mailalerts/mailalerts.php @@ -258,7 +258,7 @@ class MailAlerts extends Module public function hookActionValidateOrder($params) { - if (!$this->_merchant_order || empty($this->_merchant_mails)) + if (!$this->_merchant_order || empty($this->_merchant_mails) || !Configuration::get('PS_STOCK_MANAGEMENT')) return; // Getting differents vars @@ -431,7 +431,7 @@ class MailAlerts extends Module $product = new Product($id_product, true, $id_lang, $id_shop, Context::getContext()); $ma_last_qties = (int)Configuration::get('MA_LAST_QTIES'); - if ($product->active == 1 && (int)$quantity <= $ma_last_qties && !(!$this->_merchant_oos || empty($this->_merchant_mails))) + if ($product->active == 1 && (int)$quantity <= $ma_last_qties && !(!$this->_merchant_oos || empty($this->_merchant_mails)) && Configuration::get('PS_STOCK_MANAGEMENT')) { $iso = Language::getIsoById($id_lang); $product_name = Product::getProductName($id_product, $id_product_attribute, $id_lang);