[-] BO & FO & MO : #PSCFI-4237 : adding id_lang in method l() of class Mail()
This commit is contained in:
@@ -185,7 +185,7 @@ class MailAlerts extends Module
|
||||
|
||||
// Filling-in vars for email
|
||||
$template = 'new_order';
|
||||
$subject = $this->l('New order').' - '.sprintf('%06d', $order->id);
|
||||
$subject = $this->l('New order', (int)$id_lang).' - '.sprintf('%06d', $order->id);
|
||||
$templateVars = array(
|
||||
'{firstname}' => $customer->firstname,
|
||||
'{lastname}' => $customer->lastname,
|
||||
@@ -238,7 +238,7 @@ class MailAlerts extends Module
|
||||
);
|
||||
$iso = Language::getIsoById((int)($id_lang));
|
||||
if (file_exists(dirname(__FILE__).'/mails/'.$iso.'/'.$template.'.txt') AND file_exists(dirname(__FILE__).'/mails/'.$iso.'/'.$template.'.html'))
|
||||
Mail::Send($id_lang, $template, $subject, $templateVars, explode(self::__MA_MAIL_DELIMITOR__, $this->_merchant_mails), NULL, $configuration['PS_SHOP_EMAIL'], $configuration['PS_SHOP_NAME'], NULL, NULL, dirname(__FILE__).'/mails/');
|
||||
Mail::Send((int)$id_lang, $template, $subject, $templateVars, explode(self::__MA_MAIL_DELIMITOR__, $this->_merchant_mails), NULL, $configuration['PS_SHOP_EMAIL'], $configuration['PS_SHOP_NAME'], NULL, NULL, dirname(__FILE__).'/mails/');
|
||||
}
|
||||
|
||||
|
||||
@@ -308,7 +308,7 @@ class MailAlerts extends Module
|
||||
if ($params['product']['active'] == 1)
|
||||
{
|
||||
if (file_exists(dirname(__FILE__).'/mails/'.$iso.'/productoutofstock.txt') AND file_exists(dirname(__FILE__).'/mails/'.$iso.'/productoutofstock.html'))
|
||||
Mail::Send((int)Configuration::get('PS_LANG_DEFAULT'), 'productoutofstock', Mail::l('Product out of stock'), $templateVars, explode(self::__MA_MAIL_DELIMITOR__, $this->_merchant_mails), NULL, strval(Configuration::get('PS_SHOP_EMAIL')), strval(Configuration::get('PS_SHOP_NAME')), NULL, NULL, dirname(__FILE__).'/mails/');
|
||||
Mail::Send((int)Configuration::get('PS_LANG_DEFAULT'), 'productoutofstock', Mail::l('Product out of stock', (int)Configuration::get('PS_LANG_DEFAULT')), $templateVars, explode(self::__MA_MAIL_DELIMITOR__, $this->_merchant_mails), NULL, strval(Configuration::get('PS_SHOP_EMAIL')), strval(Configuration::get('PS_SHOP_NAME')), NULL, NULL, dirname(__FILE__).'/mails/');
|
||||
}
|
||||
}
|
||||
if ($this->_customer_qty AND $params['product']['quantity'] > 0)
|
||||
@@ -362,7 +362,7 @@ class MailAlerts extends Module
|
||||
$iso = $this->context->language->iso_code;
|
||||
|
||||
if (file_exists(dirname(__FILE__).'/mails/'.$iso.'/customer_qty.txt') AND file_exists(dirname(__FILE__).'/mails/'.$iso.'/customer_qty.html'))
|
||||
Mail::Send((int)(Configuration::get('PS_LANG_DEFAULT')), 'customer_qty', Mail::l('Product available'), $templateVars, strval($customer_email), NULL, strval(Configuration::get('PS_SHOP_EMAIL')), strval(Configuration::get('PS_SHOP_NAME')), NULL, NULL, dirname(__FILE__).'/mails/');
|
||||
Mail::Send((int)Configuration::get('PS_LANG_DEFAULT'), 'customer_qty', Mail::l('Product available', (int)Configuration::get('PS_LANG_DEFAULT')), $templateVars, strval($customer_email), NULL, strval(Configuration::get('PS_SHOP_EMAIL')), strval(Configuration::get('PS_SHOP_NAME')), NULL, NULL, dirname(__FILE__).'/mails/');
|
||||
if ($customer_id)
|
||||
$customer_email = 0;
|
||||
self::deleteAlert((int)$customer_id, strval($customer_email), (int)$id_product, (int)$id_product_attribute);
|
||||
|
||||
Reference in New Issue
Block a user