[-] Module: Mailalert should not send email to employee if stock management is disabled #PSCFV-5841
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user