I am creating a storefront for a client using Prestashop. Prestashop uses Smarty.TPL files. I read flexible documentation and browsed the web, but all suggestions do not work.
First, I created the site using regular .php pages, and I include the .php header on each page.
Then I created a directory for prestashop and got it. I edited the header.tpl file and was able to execute hard code in the header.php code. The problem with this; when I want to edit the title (nav bar, images, social media), I have to edit it in two different places. So I tried to "Include" my header.php file.
Although, when I try to use smarty {include_PHP "file.php"} and / or {PHP} enable ... {PHP}, Prestashop errors and gives me a blank white page - no errors were generated - (in chrome it gives me an "error server ") until I select the inbox.
I tried replacing all header.tpl code with smarty enabled and another piece of code that had a header, but none of them worked. Any suggestions? I just want one heading where I only need to edit it once to make changes.
Using Prestashop v 1.4.4.0
Edit: I changed allow_php to true from false. Now he is trying to add the file, although he says that he cannot find the file. I placed it next to header.tpl and just used:
{php} include('navBar.php'); {/php}
source share