I'm creating a payment plugin that needs to send info on the order e-mail to the client. I got the info on the order notes, but I need a message token to add order notes to the e-mail.
Is there any plugin for this?
If I create a provider how can I tell nop commerce I have a new token provider?!
I'm creating a payment plugin that needs to send info on the order e-mail to the client. I got the info on the order notes, but I need a message token to add order notes to the e-mail.
Is there any plugin for this?
If I create a provider how can I tell nop commerce I have a new token provider?!
I've read the class top to bottom several times, and I'm still clueless about how to do it!
I still can't figure: 1- is the token added on install? 2- how do I add it?!
I'm really need this done and I'm completly confused....
[Assuming source code of 2.65]
If you look at SendNotification of WorkflowMessageService, tokens is just an IEnumerable<Token>, which makes adding token a matter of populating a list. Then you'll need the Tokenizer to replace tokens with actual values. :D
Tokens aren't something added to the DB. It's a collection of functions that get called every time a message is tokenized. The function will determine what tokens to look for and what value should replace it.
When you say add a token, you're really just modifying a function to start looking for that token along with the other ones it already does.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.