kutyi Posted October 22, 2013 Share Posted October 22, 2013 (edited) Hi! Please help me how to translate the subject of the new_order.html email template. In the backoffice I just find "No Subject was found for new_order in the database" The email which is sent to me contains the subject "New order - #000001" Where is the place to translate it? PS version 1.5.6 Edited October 22, 2013 by kutyi (see edit history) 1 Link to comment Share on other sites More sharing options...
vekia Posted October 22, 2013 Share Posted October 22, 2013 localization > translations > modules translations search for "mailalerts" module and here it is: Link to comment Share on other sites More sharing options...
kutyi Posted October 22, 2013 Author Share Posted October 22, 2013 thx, but it's already translated in mailalerts module... Link to comment Share on other sites More sharing options...
moonoi Posted April 26, 2014 Share Posted April 26, 2014 (edited) answer from the bugtracker... http://forge.prestashop.com/browse/PSCFV-10827 Hi, It seems that mailalert module has the same email name that the customer order email. In the mails directory of your language, find a file named lang.php, at the bottom you should find the translation for "New order - #%06d" where you can change it. For french $_LANGMAIL['New order - #%06d'] = 'Nouvelle commande - #%06d'; Best regards except it is not fixed for installed modules. Edited April 26, 2014 by moonoi (see edit history) Link to comment Share on other sites More sharing options...
ChrisMessina Posted December 9, 2014 Share Posted December 9, 2014 For PrestaShop 1.6.0.9 / module version 3.4.4, the line to add is: In file /themes/yourtheme/mails/lang/yourlang.php $_LANGMAIL['New order : #%d - %s'] = 'Nouvelle commande : #%d - %s'; Link to comment Share on other sites More sharing options...
jordipalet Posted December 24, 2014 Share Posted December 24, 2014 For PrestaShop 1.6.0.9 / module version 3.4.4, the line to add is: In file /themes/yourtheme/mails/lang/yourlang.php $_LANGMAIL['New order : #%d - %s'] = 'Nouvelle commande : #%d - %s'; I'm in PS 1.5.4.1, having the same trouble. Emailalerts sent to the shop, such as "new_order" have in the email template translations have a "no subject was found for new_order in the database". I've tried editing mails/es/lang.php and adding a line $_LANGMAIL['New order'] = 'Nuevo pedido'; but seems is not working. What I'm missing ? Link to comment Share on other sites More sharing options...
jordipalet Posted December 24, 2014 Share Posted December 24, 2014 I'm in PS 1.5.4.1, having the same trouble. Emailalerts sent to the shop, such as "new_order" have in the email template translations have a "no subject was found for new_order in the database". I've tried editing mails/es/lang.php and adding a line $_LANGMAIL['New order'] = 'Nuevo pedido'; but seems is not working. What I'm missing ? I've google around and found an example of mailalerts.php, which has: // Filling-in vars for email $template = 'new_order'; $subject = $this->l('New order', $id_lang); $templateVars = array( however, mind don't have the $subject = $this->l('New order', $id_lang); should I add it or this is an old version of myalerts.php ? Link to comment Share on other sites More sharing options...
ChrisMessina Posted December 24, 2014 Share Posted December 24, 2014 I'm in PS 1.5.4.1, having the same trouble. Emailalerts sent to the shop, such as "new_order" have in the email template translations have a "no subject was found for new_order in the database". I've tried editing mails/es/lang.php and adding a line $_LANGMAIL['New order'] = 'Nuevo pedido'; but seems is not working. What I'm missing ? The file to edit is in you theme's folder: /themes/yourtheme/mails/lang/yourlang.php Link to comment Share on other sites More sharing options...
jordipalet Posted December 28, 2014 Share Posted December 28, 2014 The file to edit is in you theme's folder: /themes/yourtheme/mails/lang/yourlang.php Tried, but didn't worked. In /modules/mailalerts/mailalerts.php I've found this text { Mail::Send( $id_lang, 'new_order', sprintf(Mail::l('New order : #%d - %s', $id_lang), $order->id, $order->reference), $template_vars, $merchant_mail, null, $configuration['PS_SHOP_EMAIL'], $configuration['PS_SHOP_NAME'], null, null, $dir_mail, null, $id_shop ); Seems to me that id_lang is ment to look for the language of the "New order :" text ? I'm going to try to directly replace "New order :" to spanish, but I will prefer to understand what file is being looked up for the automatic translation. Any hint ? Link to comment Share on other sites More sharing options...
Hermeswein Posted December 29, 2014 Share Posted December 29, 2014 (edited) I'm going to try to directly replace "New order :" to spanish, but I will prefer to understand what file is being looked up for the automatic translation. Any hint ? It was the same for me. It now cost me some time to work it out, but now works. As mentioned above just include the line... $_LANGMAIL['New order : #%d - %s'] = 'yourlocaltranslation: Nr. %d - %s'; into the file /themes/theme-name/mails/yourlanguage The "proof" the module reallx expectes "New order : #%d - %s" (with a : and not a = or something else) can also be checked in the source code in modules/mailalerts/mailalerts.php Mail::Send( $id_lang, 'new_order', sprintf(Mail::l('New order : #%d - %s', $id_lang), $order->id, $order->reference), $template_vars, $merchant_mail, null, $configuration['PS_SHOP_EMAIL'], $configuration['PS_SHOP_NAME'], null, null, $dir_mail, null, $id_shop ); Edit: Very odd: Everything worked fine, then I edited some eMails a bit, and now it doesn't work anymore. I also get the impression that the line which I included and which got it working (see above) is again removed from the lang.php. Any ideas? Edited December 29, 2014 by Hermeswein (see edit history) Link to comment Share on other sites More sharing options...
letrof Posted April 16, 2015 Share Posted April 16, 2015 Edit: Very odd: Everything worked fine, then I edited some eMails a bit, and now it doesn't work anymore. I also get the impression that the line which I included and which got it working (see above) is again removed from the lang.php. Any ideas? Same here - everything was just fine untill I've translated mails with "edit html version" button. Now I've got "new order" and "out of stock" Link to comment Share on other sites More sharing options...
Recommended Posts