Jump to content

Using mail class from tpl?


drasl

Recommended Posts

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

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

 

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...