Sasha Ue Chirico Sasha Ue Chirico - 1 month ago 10
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

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');