Hi, this is my first time creating a module for prestashop and i'm stuck with sending a php variable to the tpl file.
I'm using smarty for sending that variable but when i upload the module nothing get diplyed:
What i did wrong? You have an idea?
Thanks for your time and helps;
my regards.
Here i wrote down the code of it.
In php file:
public function test($params){
$smarty= new smarty();
$test='<h1>TEST</h1>';
$smarty->assign('TS',$test);
$smarty->display('newmod.tpl');
}
In tpl file:
<div id="mymodule_block_home" class="block">
<div class="block_content">
<div>
{$TS}
</div>
</div>
</div>