If in PHP it is $shop_name
You need to in PHP run:
$Smarty->assign('shop_name', $shop_name);
And in Smarty template:
{$shop_name}
(I don't know Prestashop so maybe $Smarty should be lower-case)
Frage
How can I display the shop name in a module?
I know the global variable of smarty is $shop_name
.
I tried with $Smarty.shop_name
, but didn't work
Lösung 4
If in PHP it is $shop_name
You need to in PHP run:
$Smarty->assign('shop_name', $shop_name);
And in Smarty template:
{$shop_name}
(I don't know Prestashop so maybe $Smarty should be lower-case)
Andere Tipps
I know it is old but it can be directly got in the tpl with:
{Configuration::get('PS_SHOP_NAME')}
It does the trick but it is better to send it using the smarty assign function
How about PS_SHOP_NAME
? I believe it is loaded by the FrontController
and available in every front office page.
As per version 8.00 this is working (and it should be used this way anyway)
Use this variable in a .tpl
template
{$shop.name}
That's it!