Jump to content

Post your Prestashop tricks

Recommended Posts

1. I have modules that display static content most of the time. They rarely change. I get rid of the module, copy it's content and re-add it into an .html file. Then I include it as an .html file instead of a .tpl file.


{fetch file="$tpl_dir./module-contents.html"}


If you use this instead of making a .tpl file you can change it without having to compile.


2. I also find that when I need to add css changes - especially when there are browser specific css changes necessary, I include a inline css with the browser conditionals in the header.tpl file.

If the conditionals apply to a specific page I include it at the top of the (say) product.tpl file. Although it is recommended to load your css first for faster browser rendering and page speed, I'm not completely sure if this applies to inline styles - though it might.


{fetch file="$tpl_dir./css.html"}


Inline css is always faster than loading a style sheet and improves page performance.


3. If I do have to recompile a template I have bookmarked buttons that automatically switch the store into compile mode.


Make two new bookmarks. Name one On the other Off and replace your info below and edit the book mark and paste in this


"Compile On" : yoursite.com/<your admin dir/index.php?tab=AdminPerformance&token=<your security token>&smarty_cache=1&smarty_force_compile=1&submitSmartyConfig= Save


"Compile Off" : yoursite.com/<your admin dir>/index.php?tab=AdminPerformance&token=<your security token>&smarty_cache=1&smarty_force_compile=0&submitSmartyConfig= Save

Edited by rkinfo (see edit history)
  • Like 1

Share this post

Link to post
Share on other sites
This topic is now closed to further replies.
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More