Full integration with commerce module

Created on 24 March 2022, almost 3 years ago
Updated 22 May 2023, almost 2 years ago

Commerce currently works with Symfony Mailer, but the integration is limited. Effectively Commerce is still building the email, and Symfony Mailer is only transporting it. If we add an EmailBuilder for Commerce then we can use all of the features of Symfony Mailer:
Twig templates & variables, Mailer Policy (for addresses, subject, body), rendering, language switching, etc. This would pave the way for removing the corresponding code from Commerce.

The commerce template commerce-order-receipt.html.twig is quite long (150 lines) and is effectively rendered HTML. The natural approach in Symfony Mailer would be to use Drupal mechanisms more:

  • Put the CSS in a CSS file which is part of a library - hence easy to theme
  • Render the order entity using formatters to generate markup for fields
  • Use "Manage Display" settings to control which fields are displayed and their order
  • The template can then be short and simple, with only any wrapping text

Original summary

I have create a new policy for commerce order email. But when I type tokens or twig code does not converted to values of them. Typed as clear text. Is something that I have to enable? The other examples that the module have produce by installation, register email etc (that use tokens as I have see) works ok and transform tokens to values at sending emails.

✨ Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

🇬🇷Greece tarasiadis

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024