It would be beneficial if emails received would be based on account language preference, rather than having same language for all emails for the shop.
Currently when an email is the template and subject are got with Reaction.Email.getTemplate(tpl) and Reaction.Email.getSubject(tpl). In those functions language gained by calling Reaction.getShopLanguage() which is language of the shop. Then they call Templates.findOne({ name: template, language });. This means all accounts will receive the same language emails (language of the shop).
My proposed solution would be to extend Accountprofile schema to add language field and then Reaction.Email.getTemplate and Reaction.Email.getSubject accept an additional parameter language.
It would be beneficial if emails received would be based on account language preference, rather than having same language for all emails for the shop.
Currently when an email is the template and subject are got with
Reaction.Email.getTemplate(tpl)
andReaction.Email.getSubject(tpl)
. In those functions language gained by callingReaction.getShopLanguage()
which is language of the shop. Then they callTemplates.findOne({ name: template, language });
. This means all accounts will receive the same language emails (language of the shop).My proposed solution would be to extend
Account
profile
schema to addlanguage
field and thenReaction.Email.getTemplate
andReaction.Email.getSubject
accept an additional parameter language.