Jump to content

Editing .tpl files

Recommended Posts

I'm fairly new to presta shop but am very familiar with smarty... However, I have my hands tied with this question.

Is there some caching that sets a time after editing .tpl files? I have made many changes such as removing footer and header div's just for testing purposes and nothing has altered... The original content is still there.


I am only using the default prestashop theme.


Many thanks, :)


Link to comment
Share on other sites

  • 2 months later...

Hi. It doesn't run for me...

I tried forcing compile and saving but when I refresh it doesn't run...

My category module appears white. I need showing my changes on .tpl and I can not get it.

If I turn force compile again to off, it doesn't show my changes.


Any help?

Link to comment
Share on other sites

Hi Carl.

I tried deleting "<img src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category')}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'}" id="categoryImage" width="{$categorySize.width}" height="{$categorySize.height}" />" from the category.tpl of my theme but it doesn't run.

I try it marking "force compilation" and I also tried with category.tpl of default theme of Prestashop but it doesn't run.

I can not make any change in any .tpl because it has no effects. I also tried deleting my cache... with no exit :(

Can you help me?

Link to comment
Share on other sites

As I told you "Forced compilation" should be set to "ON" and "Cache" set to "NO" in preferences/performances.


You should also clear your browser cache and there is no reason for your changes not to appear.


Take a look into \tools\smarty\cache and \tools\smarty\compile to be sure that you have no more files except index.php that should not be deleted.

Link to comment
Share on other sites

I set "forced copilation" to "on" and "cache" to off, then I cleared my browser cache and all files in tools\smarty\cache and tools\smarty\compile except index.php... I made changes in category.tpl of my theme deleting only the <img> tag I said in the other post, and after I set "forced compilation" to "on"... but the result is a white category page. I can see everything (header, left column, footer...) but no content, as I show you on this picture:



On this other picture you can see how I set compilation to on and cache to off:



Link to comment
Share on other sites

I already installed those modules and categories block, cart, etc...

I see all I want and my content (categories and products) but if I want to modify any .tpl and follow all the process you explained to me (compilation, cache, clear smarty cache...) then categories appears on white (like you can see in my message #12)... but my product details appears correctly!!!

I don'nt know why...

Link to comment
Share on other sites

I've uploaded all the website to Internet and set to display errors and we can see this message instead of products list:

Fatal error: Smarty error: [in /var/www/vhosts/parafarmaciacentre.com/httpdocs/themes/theme178/category.tpl line 61]: syntax error: unexpected {elseif} (Smarty_Compiler.class.php, line 486) in /var/www/vhosts/parafarmaciacentre.com/httpdocs/tools/smarty_v2/Smarty.class.php on line 1095

I can not find any error in this line of my category.tpl...


Now I can send you user and password of backoffice and FTP, by private message.


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...