I hope you understand my bad english.
I have message type Commerce Order: order processing notify to send a mail for change of status.
The rules settings I have here in a image.
How it all works beautifully. Only I have a big one with the language.
If I admin area language (German) send out a mail to a customer in English or that mail arrives in German, even though the user had set his language in English.
I've tried everything. If I set the admin language to English all get an English email, and the German customer.
I have set in message type translation. German and English.
I do not remember more. I tried the language by rules to check but I do not know how to do it.
Why it sends the e-mail to the admin language, and not by language of the customer?
Comment | File | Size | Author |
---|---|---|---|
#3 | commerce_message.zip | 20.11 KB | fugazi |
#1 | 22-05-_2014_18-05-27.jpg | 261.07 KB | fugazi |
#1 | 22-05-_2014_18-09-19.jpg | 115.98 KB | fugazi |
Comments
Comment #1
fugazi CreditAttribution: fugazi commentedComment #2
fugazi CreditAttribution: fugazi commentedif I change the order status, and the admin page is.
hxxp://mysite.de/en/users/user-0#overlay=en/admin/commerce/orders will be adjusting the message sent in English. Even if the set language of the user is German.
hxxp://mysite.de/de/users/user-0#overlay=en/admin/commerce/orders will be shipped in the German message. Even if the set language of the user is English.
I do not understand why the message is not sent the user in the selected language.
Best Regards
Comment #3
fugazi CreditAttribution: fugazi commentedI have now the modules commerce_message for additional message types and matching rules rewritten (I know, that one that does not make). Maybe somebody once pleasurable to test this, to see that the new message type will not be sent in the language of the user.
The Module is now writing two new message types "Order Processing notify" and "Order complete notify". Both will be prompted by a message on Rules Change the status "Processing in progress" and "completed" to send.
Here also, the message from the system will send in the correct language and even sent with status change, unfortunately not.
Comment #4
fugazi CreditAttribution: fugazi commentedComment #5
fugazi CreditAttribution: fugazi commentedI only problem I mean? Or it happens in other multi-language pages?
Comment #6
fugazi CreditAttribution: fugazi commentedI have now through all and knows exactly that all mails are send via a command sent the admin area in its set language from the admin.
It can not be verified which language the customer is established. And so you can not create a multilingual website without a vendor's language must impose upon the customer.
A way which, although totally stupid when I set the country or the language of the customer know I need to change the prefix of the country and the customer will then receive the emial in his language.
That can not be whole purpose of rules and drupal commerce. Or?
Comment #7
suvsv CreditAttribution: suvsv commentedHave you found the solution?
Comment #8
fugazi CreditAttribution: fugazi commentedhello,
yes I could solve it with custom php code in the rules.
Value:
Comment #9
fugazi CreditAttribution: fugazi commentedif required here are my rules setting
Comment #10
suvsv CreditAttribution: suvsv commentedFantastic! Thank you.
Comment #11
maxplus CreditAttribution: maxplus commentedThanks fugazi,
I have added the same php code to my Rule where I use message notify to send out an email and now my message is send in the correct language.
See also: https://www.drupal.org/node/2177929
Comment #12
jmary CreditAttribution: jmary as a volunteer commentedThe token entity-created:message-commerce-order:owner:language is not existing on my install. Is there any specific module to install to get that one ?
Comment #13
fugazi CreditAttribution: fugazi commentedI have subsequently not pursued and have avoided between messages. I had to test this time this module used https://www.drupal.org/sandbox/mglaman/2220855
I hope that it will help you further. Oh, I have had still more i18n rules installed, but I know now no longer whether this was necessary.
Comment #14
fugazi CreditAttribution: fugazi commentedSorry double post
Comment #15
bohemier CreditAttribution: bohemier commentedThanks to fugazi for the very useful snippet... I adapted it to my anonymous checkout process by adding a language field to my order entity (since there is no user associated to orders in an anonymous checkout commerce site - well there is but it's always the anonymous user), and saving the current site language during checkout completion. Here are the rules for that:
Saving the language in the order:
Restoring the language when sending a confirmation:
Don't forget to create a field_language in the order at admin/commerce/config/order/fields - Create a text field with length 50.