Search code examples
sqlasp.net-mvctemplatesmessagenopcommerce

Creating a custom message template in nopCommerce


I've written a method that collects some sales statistics that I would like to send as an email. I've searched through the project but I just can't figure out how to do this.

In the database there's a "MessageTemplates" -table with some information about the templates like "p" and "br" -tags with parameters like customer.name and so on. These templates seem to be implemented in "WorkflowMessageService" class. There's also a class called "MessageTokensProvider" but I can't see why I would need tokens as I just want the data collected from my method returned in the new mail.

Has anyone added a message template for nopCommerce before that can explain what I need to do and how it works? This would be very much appreciated.

Thank you


Solution

  • MessageTokensProvider is to allow certain token to be replaced with dynamic data. For example %Store.Name% will be replaced with the configured store name.

    You can, of course, not use any tokens in your message template.