Sasha Ue Chirico Sasha Ue Chirico - 1 year ago 116
Smarty Question

Why is it possibile to access variables in smarty templates with Prestashop?

What is the file (or files) that allow me to access all the variables in Smarty templates written in other PHP files?

I can't find a function to do that.

Answer Source

there's not a file where you find all the smarty variables. To get one (or more) variables instantiated from other files you have to call a smarty method.

For example, if you have developed a module you have to call:

$myvar = $this->context->smarty->GetTemplateVars('myvar');
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download