I want to include in prestashop (smarty) in the folder "/themes/my_template/modules/my_modul" a php file in the tpl.
example:
<?php
include('/tools/smarty/Smarty.class.php');
$smarty = new Smarty;
$vorname="Horst";
$nachname="Meyer";
$smarty->assign('vorname',$vorname);
$smarty->assign('nachname',$nachname);
// ausgabe
$smarty->display('my_template.tpl');
?>
but the variable {$vorname} is not displayed. what am I doing wrong?
Copyright Notice:Content Author:「mirko」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/27133447/prestashop-and-smarty-php-code