Changes to the template in Prestashop are not displayed, changing classes and so on. But, on the site, none of this is displayed. What is the problem?
- Caching on the cms / server / browser side? - br3t
- @ br3t, thanks for the comments. Learned about smarty cache. - E_K
1 answer
Smarty comylates the .tpl pattern into a regular php pattern. Templates are usually stored in the templates ( $templates_dir ) directories, and for compiled templates, the templates_c folder ( $compile_dir ) is usually allocated to which the write rights are $compile_dir .
Next smarti works in two ways. In production, compiled variants are usually always used, the cache of which is cleared only manually if necessary (updated templates), while developing there is the $compile_check parameter that allows you to check the template for changes (by change date). If the template has been changed, then Smarti re-compiles it and updates the cache. If not changed, it is used from the cache.
So in your version, clearing the template cache will solve the problem, but also when transferring to the production server, do not forget to turn off the template checking, because it seriously slows down the work.
In general, you can also programmatically clear the cache of one or all templates at once. clearCompiledTemplate() used for this purpose.
If, for example, you use any version control tools (svn, git, etc.) to transfer the code to the server, then (if the system allows), you can set up some post-update scripts that will be cleared automatic cache