Order Confirmation Mail Subject

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
stiller
Posts: 86
Joined: 05 Mar 2016, 15:59

Order Confirmation Mail Subject

Post by stiller » 17 Feb 2024, 18:44

hi.

The subject of the order confirmation mail gets translated even if the order is in default language.
So we end up with a mail body text in default language whereas the subject is in a different language.
any ideas?

Aimeos: 2022.10

User avatar
aimeos
Administrator
Posts: 7854
Joined: 01 Jan 1970, 00:00

Re: Order Confirmation Mail Subject

Post by aimeos » 19 Feb 2024, 07:57

The code for generating the e-mail subject is located here:
https://github.com/aimeos/ai-controller ... d.php#L465

Please check if the translation is wrong.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

stiller
Posts: 86
Joined: 05 Mar 2016, 15:59

Re: Order Confirmation Mail Subject

Post by stiller » 19 Feb 2024, 23:29

translation is ok.
it seems the language context is wrong.
same behavior with the delivery mail
subject and mailbody in different languages

User avatar
aimeos
Administrator
Posts: 7854
Joined: 01 Jan 1970, 00:00

Re: Order Confirmation Mail Subject

Post by aimeos » 21 Feb 2024, 11:01

Language is used from the customer address in the order and is set here:
https://github.com/aimeos/ai-controller ... d.php#L436

This only works correctly, if the language is still active in the Locale > Language tab of the admin backend. Otherwise, the translation files for disabled languages are not added to the i18n object in the context and a fallback to English will occur.

The email body (html and text) is generated here:
https://github.com/aimeos/ai-controller ... #L466-L467
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

stiller
Posts: 86
Joined: 05 Mar 2016, 15:59

Re: Order Confirmation Mail Subject

Post by stiller » 23 Feb 2024, 10:15

I see.
however, I think e-mail subject and e-mail body should always have the same language.
and anyway frontend user choice should overrule the address country.
I've commented it out and now it's fine.
thank you for pointing me there

sieg01
Posts: 12
Joined: 01 Jan 1970, 00:00

Re: Order Confirmation Mail Subject

Post by sieg01 » 06 Mar 2024, 16:53

stiller wrote: 23 Feb 2024, 10:15 I see.
however, I think e-mail subject and e-mail body should always have the same language.
and anyway frontend user choice should overrule the address country.
I agree.

e.g. German in Finland (not speaking Finnish)
Ordering in Germany in German language.

Then it would be nice to keep the conversation in German - even the delivery address is in Finland. :)

User avatar
aimeos
Administrator
Posts: 7854
Joined: 01 Jan 1970, 00:00

Re: Order Confirmation Mail Subject

Post by aimeos » 08 Mar 2024, 08:33

sieg01 wrote: 06 Mar 2024, 16:53 Then it would be nice to keep the conversation in German - even the delivery address is in Finland. :)
It doesn't depend on the country but on the selected language in the delivery address (if chosen)
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply