Mail language
This commit is contained in:
parent
580621fc43
commit
cc26558cae
@ -40,5 +40,6 @@ $_LANGMAIL['Message from \').$customer->lastname.\' '] = 'Mensaje de \').$custom
|
||||
$_LANGMAIL[' $subject'] = '$subject';
|
||||
$_LANGMAIL['A friend sent you a link to\').\' '] = 'Un amigo le envio un enlace a\').\'';
|
||||
$_LANGMAIL['New voucher after refund'] = 'Nuevo código de reducción tras su devolución';
|
||||
$_LANGMAIL['Your loyalty credits'] = 'Mi crédito de fidelidad';
|
||||
|
||||
?>
|
@ -36,5 +36,6 @@ $_LANGMAIL['Congratulations!'] = 'Bravo !';
|
||||
$_LANGMAIL['Referral Program'] = 'Programme de parrainage';
|
||||
$_LANGMAIL['A friend sent you a link to'] = 'Un ami vous a envoyé un lien vers';
|
||||
$_LANGMAIL['New voucher after refund'] = 'Nouveau bon de réduction après remboursement';
|
||||
$_LANGMAIL['Your loyalty credits'] = 'Vos crédits fidélités';
|
||||
|
||||
?>
|
||||
|
@ -76,9 +76,9 @@ if ($nb > 0) {
|
||||
$id_lang = $orderModel->id_lang;
|
||||
|
||||
$templateVars = array(
|
||||
'firstname' => $customerModel->firstname,
|
||||
'lastname' => $customerModel->lastname,
|
||||
'commandenum' => $orderModel->id,
|
||||
'{firstname}' => $customerModel->firstname,
|
||||
'{lastname}' => $customerModel->lastname,
|
||||
'{commandenum}' => $orderModel->id,
|
||||
);
|
||||
|
||||
// Only Display values
|
||||
|
@ -3,8 +3,8 @@ class Mail extends MailCore
|
||||
{
|
||||
public static function Send($id_lang, $template, $subject, $templateVars, $to, $toName = NULL, $from = NULL, $fromName = NULL, $fileAttachment = NULL, $modeSMTP = NULL, $templatePath = _PS_MAIL_DIR_, $die = false) {
|
||||
if(preg_match('/^contact\+(.*)@bebeboutik.com$/', $to)) {
|
||||
return TRUE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if(!isset($templateVars['product_list'])) {
|
||||
$templateVars['product_list'] = '';
|
||||
@ -152,9 +152,11 @@ class Mail extends MailCore
|
||||
/* Create mail and attach differents parts */
|
||||
$message = new Swift_Message('['.Configuration::get('PS_SHOP_NAME').'] '. $subject);
|
||||
|
||||
global $cookie;
|
||||
$id_lang = $cookie->id_lang;
|
||||
// surchage multilangue
|
||||
if ($id_lang === null) {
|
||||
global $cookie;
|
||||
$id_lang = $cookie->id_lang;
|
||||
}
|
||||
if ($id_lang) {
|
||||
$templateVars['{shop_logo}'] = (file_exists(_PS_IMG_DIR_.'logo_mail_'.(int) $id_lang.'.jpg')) ? $message->attach(new Swift_Message_Image(new Swift_File(_PS_IMG_DIR_.'logo_mail_'.(int) $id_lang.'.jpg'))) : ((file_exists(_PS_IMG_DIR_.'logo.jpg')) ? $message->attach(new Swift_Message_Image(new Swift_File(_PS_IMG_DIR_.'logo.jpg'))) : '');
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user