You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Similar to #2043, I would like administrators to edit/create templates from the Admin UI.
Describe the solution you'd like
It would be great to allow async fetching of templates. Something like:
EmailPlugin.init({
...,templates: async(ctx,type)=>{if(type==='order-confirmation'){// Get, create or fetch my order-confirmation template from wherever I want}return{templateString: `<html>My handlebars template </html>`}})
This way we can get templates from the database based on the request context and event type, or even from external platforms (Some WYSIWYG handelbars SaaS? Just ideas...)
Describe alternatives you've considered
There currently is no way of doing this I think.
I would like to hear your thoughts on this. Is this something that should be included in Vendure, or is this a use case for a separate plugin?
Additional context
This would also remove the need for addTemplate(), since the strategy pattern above also allows for selecting templates based on language and/or channels (and more). That would make it a breaking change though..
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Similar to #2043, I would like administrators to edit/create templates from the Admin UI.
Describe the solution you'd like
It would be great to allow async fetching of templates. Something like:
This way we can get templates from the database based on the request context and event type, or even from external platforms (Some WYSIWYG handelbars SaaS? Just ideas...)
Describe alternatives you've considered
There currently is no way of doing this I think.
I would like to hear your thoughts on this. Is this something that should be included in Vendure, or is this a use case for a separate plugin?
Additional context
This would also remove the need for
addTemplate()
, since the strategy pattern above also allows for selecting templates based on language and/or channels (and more). That would make it a breaking change though..The text was updated successfully, but these errors were encountered: