drasl Posted May 27, 2016 Share Posted May 27, 2016 Hi guys, like the title says, can I use mail class from a tpl? I need to control the prices before the client confirm an order and send mail with warnings for inconsistent prices. Thanks in advance. Link to comment Share on other sites More sharing options...
shokinro Posted May 27, 2016 Share Posted May 27, 2016 Since it is a static function so I think you can do that, but before using it, you need to register the function in following file. /config/smarty.config.inc.php here is an example smartyRegisterFunction($smarty, 'function', 'convertPrice', array('Product', 'convertPrice')); Link to comment Share on other sites More sharing options...
drasl Posted May 27, 2016 Author Share Posted May 27, 2016 Since it is a static function so I think you can do that, but before using it, you need to register the function in following file. /config/smarty.config.inc.php here is an example smartyRegisterFunction($smarty, 'function', 'convertPrice', array('Product', 'convertPrice')); Oh thanks! And after i register the funcion in smarty, what is the sintaxis to use it? Link to comment Share on other sites More sharing options...
shokinro Posted May 27, 2016 Share Posted May 27, 2016 it is the same way of other functions you see, you need to assign the parameters the same way. you can try to find one as example in your existing theme files like convertPrice. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now