Jump to content

[SOLVED] Problem whit email subject


Recommended Posts

Hello everyone,

I have a problem whit email subjecct. When a customer make a order, the customer receives a confirmation email with the products ordered. This email have a subject in English "Order Confirmation", in Italian "Order Confirmation" too, in German "Order Confirmation" too, ecc ....

Now, I have translated the email, but the subject is in English. How do I change the title (Subject) from the email "Order Confirmation" in every language?

thanks for your help!

Link to comment
Share on other sites

Hello everyone,

I have a problem whit email subjecct. When a customer make a order, the customer receives a confirmation email with the products ordered. This email have a subject in English "Order Confirmation", in Italian "Order Confirmation" too, in German "Order Confirmation" too, ecc ....

Now, I have translated the email, but the subject is in English. How do I change the title (Subject) from the email "Order Confirmation" in every language?

thanks for your help!


hi diego, where did you translate the email? in the back office? note the the email templates are seperate, you can find them in the /mails folder or respective module's folder, sorted by iso codes. so, unless you changed those there (both html and txt version) you will indeed see no changes. you may need a free html editor like notepad++ to edit the html template.

phil
Link to comment
Share on other sites

Hi Phil,

The problems ist only whit "Order confermations" email. The traslating ist in /mails/order_conf.html and /mails/order_conf.txt.

I have traslate the email, but in the /mails folder can I translate the content, not the subject.

The problems ist in /classes/PaymentModule.php (360) , and I cann't resolved (version of Prestashio 1.3.1):

Mail::Send(intval($order->id_lang), 'order_conf', [b]'Order confirmation'[/b], $data, $customer->email, $customer->firstname.' '.$customer->lastname, NULL, NULL, $fileAttachment);



A you can see, the title of the email will be the same for all languages.

I would like the title of the email varies depending on the language.

I tried to change the code in this way (ist only a test), but it does not work:

Mail::Send(intval($order->id_lang), 'order_conf', [quote]'Auftragsbestätigung'[/quote], $data, $customer->email, $customer->firstname.' '.$customer->lastname, NULL, NULL, $fileAttachment);



I hope you understand me and that can help me: my knowledge of php is very limited.

Diego

Link to comment
Share on other sites

You can change that text in mails//lang.php. For example, the French translation is on line 8 of mails/fr/lang.php:

$_LANGMAIL['Order confirmation'] = 'Confirmation de commande';



Hi, I use mails/cs/lang.php for translation English to Czech, but it does not work. Subjet of email is: [www.domain-name.cz] Oder confirmation. But email, which goes to admin is ok. I dont know, where is a problem. Here is my lang.php

?php

global $_LANGMAIL;
$_LANGMAIL = array();
$_LANGMAIL[‘Your new admin password’] = ‘Vaše nové heslo’;
$_LANGMAIL[‘Your password’] = ‘Vaše heslo’;
$_LANGMAIL[‘Welcome!’] = ‘Vítejte v internetovém obchodě’;
$_LANGMAIL[‘Order confirmation’] = ‘Potvrzení objednávky’;
$_LANGMAIL[‘Message from contact form’] = ‘Zprávy z kontaktního formuláře’;
$_LANGMAIL[‘My personal informations’] = ‘Moje osobní údaje’;
$_LANGMAIL[‘Message from a customer’] = ‘Zpráva od zákazníka’;
$_LANGMAIL[‘Preparation in progress’] = ‘Připravujeme Vaši objednávku’;
$_LANGMAIL[‘Virtual product to download’] = ‘Virtuální produkt k stažení’;
$_LANGMAIL[‘Package in transit’] = ‘Sledování zásilky’;

?>

Link to comment
Share on other sites

If my above solution doesn't work for you, it might be a bug that has been fixed, since I noticed that the line was changed to the following in PrestaShop v1.4:

Mail::Send(intval($order->id_lang), 'order_conf', Mail::l('Order confirmation'), $data, $customer->email, $customer->firstname.' '.$customer->lastname, NULL, NULL, $fileAttachment);



That relies on a completely redesigned classes/Mail.php though, so it would be difficult to apply it to v1.3.2. In PrestaShop v1.4, you can edit all the mail templates and translations in the Back Office.

Link to comment
Share on other sites

  • 5 months later...
You can change that text in mails//lang.php. For example, the French translation is on line 8 of mails/fr/lang.php:

$_LANGMAIL['Order confirmation'] = 'Confirmation de commande';



Hi, I use mails/cs/lang.php for translation English to Czech, but it does not work. Subjet of email is: [www.domain-name.cz] Oder confirmation. But email, which goes to admin is ok. I dont know, where is a problem. Here is my lang.php

?php

global $_LANGMAIL;
$_LANGMAIL = array();
$_LANGMAIL[‘Your new admin password’] = ‘Vaše nové heslo’;
$_LANGMAIL[‘Your password’] = ‘Vaše heslo’;
$_LANGMAIL[‘Welcome!’] = ‘Vítejte v internetovém obchodě’;
$_LANGMAIL[‘Order confirmation’] = ‘Potvrzení objednávky’;
$_LANGMAIL[‘Message from contact form’] = ‘Zprávy z kontaktního formuláře’;
$_LANGMAIL[‘My personal informations’] = ‘Moje osobní údaje’;
$_LANGMAIL[‘Message from a customer’] = ‘Zpráva od zákazníka’;
$_LANGMAIL[‘Preparation in progress’] = ‘Připravujeme Vaši objednávku’;
$_LANGMAIL[‘Virtual product to download’] = ‘Virtuální produkt k stažení’;
$_LANGMAIL[‘Package in transit’] = ‘Sledování zásilky’;

?>



Just in case anyone else is looking into the same problem.
It doesn't work because you are using character set of the Czech language and the quote marks for the text
are invalid to prestashop coding.

This mark is not valid: ’
This mark is right: '

Example of right one:
$_LANGMAIL['Package in transit'] = 'Sledování zásilky';
  • Like 1
Link to comment
Share on other sites

  • 4 months later...

Hi, did you solve this?

I have the same problem, and I have translated everything into danish, with the right marks and so on.

I'm using the latest version 1.4.4.1

 

Can anyone help us?

 

No matter what, the order confimation mail is containing the subject "Order confirmation", even though I have translated all mail html files, textfiles,, lang.php files etc.

 

Please help?

 

Best regards,

Mobimob

Link to comment
Share on other sites

  • 4 months later...
  • 5 months later...

My problem was that I created a new template and named it "thank you". However, then I noticed that the default templates never have empty spaces in their names, but they use "_". So I renamed the template to "thank_you" and it solved my problem with subject error. Hope this helps someone. Greetings to all.

Edited by mouse1 (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...