ruisonika Posted September 24, 2020 Share Posted September 24, 2020 Hello i made a blank page following Nemo tutorial http://nemops.com/creating-new-pages-in-prestashop/#.X2yptpP0kWp. So my problem is: i wanna make a function with sql query to return something, i will put it on module php root file (i think). in tpl file how do i call the function? or i have to pass it for other file? any help please? public function getContaCorrente() { $sql = 'SELECT * FROM '._DB_PREFIX_.'contacorrente WHERE email = [email protected]'; if ($results = Db::getInstance()->ExecuteS($sql)) foreach ($results as $row) echo $row['email'].' :: '.$row['date'].'<br />'; } How do i call this in template file? Link to comment Share on other sites More sharing options...
Knowband Plugins Posted September 25, 2020 Share Posted September 25, 2020 Search for "Smarty Assign" in the Google. Refer to below link as well. https://www.smarty.net/docs/en/api.assign.tpl 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