Reputation: 7
I am testing overriding with Prestashop 1.6 and i have problem with Smarty. In admin themes file tpl exists function {include file=...}.
In directory override I replace this file and i created file which it has included, but it doesn't read this file from {include file=...}.
Any ideas?
Upvotes: 0
Views: 756
Reputation: 167
You need to override both files, the included file and the file which includes.
In the line where {include}
is used the path must be:
{include file='../_current_dir_/_file_.tpl'}
e.g. you want to override cart rules template:
override/controllers/admin/templates/cart_rules/informations.tpl
Then you need the template which includes it. form.tpl
(in this case):
override/controllers/admin/templates/cart_rules/form.tpl
Inside form.tpl
you need to change {include}
of informations.tpl
to:
{include file='../cart_rules/informations.tpl'}
Even both templates are in the same level it is for some reason needed to go one level up.
Upvotes: 1