Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6533837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:10:38+00:00 2026-05-25T10:10:38+00:00

I am creating a storefront for a client using Prestashop. Prestashop uses Smarty .TPL

  • 0

I am creating a storefront for a client using Prestashop. Prestashop uses Smarty .TPL files. I read through smarty documentation and scoured the web but all of the suggestions are not working.

I first made a site using regular .php pages and I am including the header.php on every page.

I then made a directory for prestashop and got it set up. I edited the header.tpl file and was able to hard code in the header.php code. The problem with this is; when I want to edit the header (nav bar, images, social media), I will have to edit it in two different places. So I tried to “Include” my header.php file.

Though, when I try using smarty’s {include_PHP “file.php”} and/or {PHP}include…{PHP}, Prestashop errors out and gives me a blank white page – no errors are given – (in chrome it gives me a “server error”) until I take out the includes.

I tried replacing the entire header.tpl code with a smarty include and another piece of code that had a header hook, but none of these worked. Any suggestions? I just want one header where I only have to edit it once to make changes.

Using Prestashop v 1.4.4.0

Edit: I changed allow_php to true from false. Now it’s trying to add the file, though it says it can’t find the file. I placed it next to header.tpl and just used:

{php}
            include('navBar.php'); 
       {/php} 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T10:10:38+00:00Added an answer on May 25, 2026 at 10:10 am

    ANSWERED!

    When using Smarty .TPL files, when you include something, you are not including from the path of the file you are working on. You are including from where the index is.

    Example:

    I am working on header.tpl, this is located in:
    siteroot/smartyinstall/themes/themename/header.tpl

    When the include is looking for the file, it is actually looking for it in the smarty root folder because the header.tpl is being pulled into the index.html page that is in the smartyinstall folder.

    So, you have to go from there. In my case, the header that I was trying to include was in:
    siteroot/includes/navBar.php

    so, I had to write include(‘../includes/navBar.php’);, only going up one directory, instead of four.

    I hope this helps everyone that has a problem like this!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Creating the closure is easy but using it is confusing for me. Here is
creating users through mysql admin, but unable to login mysql command line following on-line
Creating a website using simple html(not html5) and css but got stock in mouseover
Creating an XPathDocument with referenced DTD sometimes throws a web exception. Why?
When creating a web application, and lets say you have a User object denoting
Creating a table without tbody using javascript createElement/appendChild will not add tbody in Firebug
Creating sprite sheets aka texture atlases rather than using many hundres of individual images
Creating extensions got much easier with Vs2010, but this seems not to be the
Creating a site in with FrogCMS and using alot of jquery to create an
Creating a popup window from main page with window.open, the child/popup page uses the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.