0

Is there a way to have the order receipt e-mail be in the language of the site version that was used for placing the order?

The order receipt e-mail that gets sent out (content of commerce-order-receipt.html.twig) for a guest is currently always in the default language. That means a user would order items from the French site, and get an English confirmation. It appears that no language data is saved for an order, so I guess there's no built-in way to do this.

Does anyone have any ideas?

1 Answer 1

1

This is a known problem. Orders need a language field.

That will be added as a part of https://www.drupal.org/project/commerce/issues/2603482

2
  • I thought as much. Considering you opened that issue almost 3 years ago though, I think it might be another couple of years before there is real progress. I suppose that for now I can add acustom language field to orders and create a custom module with an updated copy of OrderReceiptSubscriber.php that reads said field. Or is there a better option available? Commented Sep 11, 2018 at 13:05
  • Sounds like a decent plan to me. Commented Sep 12, 2018 at 9:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.