vendure-ecommerce / vendure

The commerce platform with customization in its DNA.
https://www.vendure.io
Other
5.52k stars 978 forks source link

EmailPlugin: Allow easy customization on a per channel basis #2933

Closed mschipperheyn closed 1 month ago

mschipperheyn commented 1 month ago

Is your feature request related to a problem? Please describe. In a multi channel scenario email look and feel can vary per channel. Currently, the concept of globalTemplateVars presumes a look and feel that is global. You cán pass templateVars on a per EmailEvent basis, but that is not exactly ideal if you want to assure consistency across emails

Describe the solution you'd like A callback function that allows me to retrieve settings (styles, images, etc) on a per channel basis and apply that to the header and foot fragments.

Describe alternatives you've considered Placing this information in the templateVars. That requires processing each time you create an EmailEvent. An alternative I'm considering implementing is a wrapper for the EmailEvent that returns the relevant settings and assigns them to the templateVars.

mschipperheyn commented 1 month ago

PR in progress