Tone87 Posted August 27, 2018 Share Posted August 27, 2018 (edited) Hi, in product.tpl i wanna use a static method from my module: public static function getVendite($id_prodotto = '') { if (!empty($id_prodotto)) { return 1; } else return false; } i tried tu use : {assign var='vendite' value=MyModuleName::getVendite($product.id)} or {$vendite=MyModuleName::getVendite($product.id)} but not works. someone can help me how to use a static method of my module in smarty template ? Edited August 27, 2018 by Tone87 (see edit history) Link to comment Share on other sites More sharing options...
Knowband Plugins Posted August 27, 2018 Share Posted August 27, 2018 I don't think its possible to call module static function from product.tpl You can use displayHook to achieve the same (Call the function in product displayHook & pass the value to tpl) . If you let us know what you trying to achieve then we can let you know which hooks (Action, Display etc) can be used for the same. 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