Some people face problems when they try to update or modify their Prestashops. They update files, install modules, but these actions are not visible in Prestashop. This problem often occurs in new Prestashop version – 1.4, because Prestashop 1.4 uses new cache system, now caching with “Smarty” and “Memcached”.
Some information about what is cache: http://en.wikipedia.org/wiki/Cache#Web_cache
When you modify your Prestashop, you can disable cache in admin panel: Preferences > Performance
- “Smarty“ block – „Cache:“ disabled
- „Caching“ block – „Use cache:“ disabled
Delete cache manually, clean up this folder:
- Prestashop root folder/tools/smarty/cache/
- Prestashop root folder/tools/smarty/compile/
If you use smarty v2, clean up this folder:
- Prestashop root folder/tools/smarty_v2/cache/
- Prestashop root folder/tools/smarty_v2/compile/
Prestashop 1.5.x, Prestashop 1.6.x :
- Prestashop root folder cache/smarty/cache/
- Prestashop root folder cache/smarty/compile/
- Prestashop root folder cache/class_index.php (classes and controllers map)
When you add Prestashop in your business, it is recommended not to delete cache files and turn on all cache, because then your shop will work much faster.
Hi,
Delete cache manually is an option, but you will have to delete it each time you make a change.
To make it automatically, please locate to /config/smarty.config.inc.php, find this line:
$smarty->compile_check = false;
and change to:
$smarty->compile_check = true;
Now, your modifications will be refelected immediately.
If you’re using version 1.5.4 do not change de code!
Go to Advanced Parameters > Performance > Smarty > Cache Model – option Force compilation
Saved me from lots of trouble..have spend ages to find this solution!!! It works perfectly even though site becomes bit slow but its good for development!
Thank you Nguyễn Thanh Tùng. It actually solved my problem. But it would be good if you can explain this bit of code. I mean the effect of true and false.
Thanks
I have got proglem with caching. Users dont see updates to shopping cart (it seems empty at frontpage even if they added some goods) etc.
Only one solution I found is to disable caching. Some strange bug…
I need it, thx, Good info.
Just do like this while developing/debugging:
Preferences>performance > Force compile > thick yes..
when you are done you can turn it to no and this is it 🙂
simple as that
Hi. It doesn’t run for me…
I set “force decompile” to on, set cache to off, cleared my navigator cache, cleared compile and cache folders of tools/smarty, made changes on my .tpl and later set again “force decompile” to off…
But no result… my page appears on white: the .tpl that I modify appears with anything on it.
Can you help me?
Thanks!
Hi,
if you page always is white – you have make a critical error.
Turn on Prestashop debugger, check where it is and fix it.
Hi,
I have the same problem as PUBLITESA – just wondering if you found a solution to this ?
I installed a clean Prestashop, without modules, and I’m activating them as soon I need them. Is possible that this was the reason because I can not modify any .tpl? Maybe I have to activate any other module?
Hi,
modules are separated from templates (*.tpl files).
” I can not modify any .tpl” – what happens when you edit the file?
It was PS version…
My theme only works propertly with 1.4.3 and I was using 1.4.6.2.
And for modifying image category, I did it on theme/scenes.tpl file.
Thanks!
Thanks, guys. I’ve had some problems with cache of Smarty. Now it’s ok 🙂
Oh Yeah !!
Now, it runs fine.
Thank you.
Good info.
Hello this is my first time in Prestashop. So I cleared the cache and I lost a lot of data. Is there a way to go back?? The site is no longer as it was before. Please if anyone can help me I will be eternally grateful.
Hi,
what you exactly lost? All data is stored in the database, only images and attach files on the server.
Maybe you have done something else…
When I install the autoupgrade module and then go to configure it I get a checklist on the right which tells me that :-
You de-activated or are not using the Caching features of PrestaShop
I have smarty cache enabled and lower down caching using File System (CacheFS)
But this problem is preventing me from updating PS from 1.4.6.2 to 1.5.
Any ideas?
I must need some sleep.
I was confused with enabling the cache and also using the memcach, I was trying to do two things at once.
It’s all sorted now, phew!
PrestaShop 1.5
Found cache in the following folder: /cache/smarty/cache
Solved the problem of cached module translation. Thanks to author!
Hi,
it doesn’t seem to work with me…
I’m new to Prestashop and I’m using version 1.5.3.1 on my computer. I cleaned up the cache manually and turned off Smarty cache and Caching, but no results. I’m trying to modify the Social Block for adding more networks. In the Backend I can see the new field, but in the Frontend nothing. I even added a extra target=”_blank” to the .tpl to be sure it was updated, but even that won’t appear.
Having a small heart attack here. I’m using 1.4 I think, and deleted the cache manually so that a change would actually take effect.
That worked, but now I can’t see any products on the website in any category! What have I done / how do I undo that?
Thanks,
Heather
Hi,
You before edited Prestashop code (php or tpl file)?
One of the options: You previously having damage Prestashop code, but did not notice because everything loaded from cache.
Try debug your Prestashop.
Hi,
thanks for the best article!!
I have a question: when I try to disable the caching I have the error 504… is it possible to set “no” (or false) in a specific file o in the db?
I see that into the folder cache/cachefs there are more than 10000 files in each sub-folder, if a delete them manually have I some problem?
best regards,
Matteo
Hi,
Try to first turn on the Prestashop debug mode and then turn off the cache.
From error code is not always possible to judge the problem.
More info about server error code:
http://www.checkupdown.com/status/E504.html
Hi,
thanks for the reply!
I tried to do your suggestion but there aren’t changes
Matteo
Hello,
When updating:
TM Banner Block
TM Slider
Changes wont show! i deleted a slide a month ago and its still there. So far i have:
-Cleared browser cache
-Enable forced compile (and back again)
-Disable cache (and back again)
-Cleared files on smarty cache and compile.
I do have a smarty_v2 cache file but it only has one file on it: index.php …should i delete this one? Is there anything else im missing?
Thanks.
Hi,
index.php – you don’t need delete this file.
We think you need clean up only two folders:
prestashop root folder/cache/smarty/compile/
prestashop root folder/cache/smarty/cache/
“Changes wont show!” – maybe that slide is from another module (ex. “Image slider for your homepage”, “Featured products on the homepage” or “Home text editor” module)?