Rubens Cury Posted January 12, 2011 Share Posted January 12, 2011 Hi Guys, I would like to congratulate the forum for its importance in day-to-day those who are choosing Prestashop as e-commerce solution. I'm experiencing a problem related to the cache that someone may have experienced too. Apparently when I use my shop through IE caches the shopping cart and also other pages are not zeroed, even though the option of no-cache is set. For ALL other browsers, this problem does not occur, ie the pages are reloaded with the updated content as it should be. In IE, I can only update it using the CTRL + F5. Actually the biggest problem related to the cache is in the shopping cart when trying to delete one of the products added to it. Usually the 1st removal product is successful, the other place but the page does not refresh. I say "happens" because you pressed CTRL + F5 to reload the page without the products that were removed from the cart. Some measures which I considered to share with you: 1) Application is running on LINUX. 2) This is the beginning of the page smarty.config.inc.php require_once (_PS_SMARTY_DIR_. 'Smarty.class.php'); $ Smarty = new Smarty (); $ Smarty-> template_dir = _PS_THEME_DIR_. 'Tpl'; $ Smarty-> compile_dir = _PS_SMARTY_DIR_. 'Compile'; $ Smarty-> cache_dir = _PS_SMARTY_DIR_. Cache; $ Smarty-> config_dir = _PS_SMARTY_DIR_. 'Configs'; $ Smarty-> debug_tpl = _PS_ALL_THEMES_DIR_. "Debug.tpl '; $ Smarty-> caching = false; $ Smarty-> force_compile = true, / / to pass "false" when put into production $ Smarty-> compile_check = false; $ Smarty-> debugging = false; 3) No error log is generated. 4) The page contains order.php the code below, which indicates that the cache should not be maintained. * Disable some caching related bugs on the cart / order * / header ("Cache-Control: no-cache, must-revalidate"); header ('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); I also believe that in fact many people must have this problem but perhaps not yet realized, because only after some testing I was realizing that this occurred. Moreover, only occurs in IE, and like most of the time I was using Chrome as a browser for development, had not noticed. Any help is very welcome! Best wishes to all, Rubens Cury Link to comment Share on other sites More sharing options...
Rubens Cury Posted January 13, 2011 Author Share Posted January 13, 2011 Hi,After numerous attempts to remove the cache in your shopping cart folow below what i did at the end of file cart.php to solve that supposed bug. //if cart.php is called by ajax if (Tools::getValue('ajax') == 'true') require_once(_PS_MODULE_DIR_.'/blockcart/blockcart-ajax.php'); else { if (sizeof($errors)) { require_once(dirname(__FILE__).'/header.php'); $smarty->assign('errors', $errors); $smarty->display(_PS_THEME_DIR_.'errors.tpl'); require_once(dirname(__FILE__).'/footer.php'); } else //The code below was commented and a new one was created to recall order.php with a random query parameter to avoiding the hell caches at shopping cart when some product is deleted. //Tools::redirect('order.php?'.(isset($idProduct) ? 'ipa='.intval($idProduct) : '')); Tools::redirect('order.php?call='.rand().'&'.(isset($idProduct) ? 'ipa='.intval($idProduct) : '')); } Link to comment Share on other sites More sharing options...
ysns Posted August 12, 2011 Share Posted August 12, 2011 Hello I have the same problem. Does this solution works for you? Link to comment Share on other sites More sharing options...
genotix Posted February 2, 2016 Share Posted February 2, 2016 I'm on version 1.6.1 and STILL have this issue. My guess is that is might be in one of the Themes files. Any idea? I'm using Leo's Fashion theme Link to comment Share on other sites More sharing options...
Recommended Posts