Is there an API function that can be used to directly call an existing Templated Email either from a module or SMT code?
Announcement
Collapse
No announcement yet.
Direct Call to a Templated Email
Collapse
X
-
Direct Call to a Templated Email
Bruce Golub
Phosphor Media - "Your Success is our Business"
Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
phosphormedia.comTags: None
-
I asked about that some time ago, and was told No, the Template Based Emails module has no API, and direct calls into its code are not recommended. Too bad, it would come in handy sometimes. The module is in the LSK, so I guess you can try and hook something up, although you might need to change it later if the module is updated.Kent Multer
Magic Metal Productions
http://TheMagicM.com
* Web developer/designer
* E-commerce and Miva
* Author, The Official Miva Web Scripting Book -- available on-line:
http://www.amazon.com/exec/obidos/IS...icmetalproducA
-
We have a pretty convoluted way of calling it in our Easy Review module for follow up emails, but I was hoping to using in an smt template and there's no way I'm coding that much with SMT code...:)
But yea, don't understand why if we cant supply the needed arrays (i.e., l.settings:order) we can't simply have a RenderTemplateEmail('TemplateCode', l.input:structure) type of API function.Bruce Golub
Phosphor Media - "Your Success is our Business"
Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
phosphormedia.com
Comment
-
You can accomplish it with two function calls and some conditioning:
TemplateOrderEmail_Load_Code(l.code, l.email)
assign and condition the l.run variable
l.run:order = l.settings:order
l.run:on_ordr = 1
TemplateOrderEmails_SendEmail(l.run, l.email)
Gordon Currie
Phosphor Media - "Your Success is our Business"
Improve Your Customer Service | Get MORE Customers | Edit Any Document Easily | Free Modules | Follow Us on Facebook
phosphormedia.com
Comment
Comment