Jump to content

[solved] HELP Changes to my tpl files won't appear even after force compilation and cache


Recommended Posts

It's been almost a week and I couldn't resolve my problem.

When I make changes to my tpl files, they won't appear in my site.

I have set:

Force compilation ON

Cache OFF

I delete the cache manually in root/cache/smarty

But nothing, changes to my tpl files won't appear.

Can someone please help?

Link to comment
Share on other sites

Hello

 

Where you want to apply changes?

Im asking because if you want to apply changes to the module .tpl files you should check your theme directory.

 

For example.

Homefeatured module. The path to the module .tpl files is themes/modules/homefeatured/homefeatured.tpl - the same file exists here: theme/your_theme/modules/homefeatured/homefeatured.tpl

 

if you want to apply changes - you should edit second file in your theme directory, otherwise changes won't appear.

  • Like 1
Link to comment
Share on other sites

It worked, thank you so much!!!

 

I have just started using Prestashop, I didn't know that.

 

If you don't mind me asking, why files are put there twice? One in the prestashop installation and one in my theme, since only changes in the one in my theme will apply to the actual site?

 

The only benefit I can think about is when upgrading to the new versions of prestashop, changes to my theme won't get lost.

Is that correct? Any other benefit?

 

Thank you so much again!

Link to comment
Share on other sites

You're welcome.

 

something about the same .tpl files

It's a prestashop feature. This feature is called Override.

 

 

PrestaShop enables you to override various default components and behaviors. This system consists of two major points:

  1. Overriding PrestaShop's own behavior (class files and controller files) in order to target a specific section of the required components.
  2. Overriding the visible parts of modules (Templates, JavaScript, style sheet language...) so that the themes can adapt better to them.

We are talking about second point.

 

PrestaShop allows you to override or replace certain front-office module files with new ones within the same theme. The override is governed by the theme: once it contains a /modules folder (or more!), PrestaShop will browse its content for files which have the same name and path as those of existing modules, and replace these with the new ones.

 

Why it is awesome? ;)

It is because sometimes you want to create own design of module .tpl files and usually you don't want to loose orginal file (because maybe in future you will want to put back original file) - then you are able to use the override feature. You can use new template file located in your theme directory with existing backup of original file in module dir.

 

Moreover, after update your prestashop to latest version, all .tpl files located in /modules/ may be changed to default! You will loose all changes! .tpl files for modules in your theme stay untouched!

 

 

 

I marked this thread as solved.

if you've got any other questions related to this thread - feel free to continue discussion

 

regards

Link to comment
Share on other sites

×
×
  • Create New...