vinaysaini Posted February 10, 2014 Share Posted February 10, 2014 (edited) I have written a module where one can change shop name. And for that my module will replace shop name by using code. Configuration::updateValue('PS_SHOP_NAME',Tools::getvalue('shop_name')); But the problem is when page gets load for first time it still shows the older name. If i reload the page then only it shows new name. Can anyone please help me how to fix this problem? Edited February 10, 2014 by vinaysaini (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted February 10, 2014 Share Posted February 10, 2014 it's not possible because page contents to smarty array are loaded before your module. what to do? you can change this with AJAX query, then after ajax query - reload page Link to comment Share on other sites More sharing options...
PascalVG Posted February 11, 2014 Share Posted February 11, 2014 Hi vinai, maybe this helps: http://stackoverflow.com/questions/12399952/only-reload-a-part-of-a-web-page pascal. Link to comment Share on other sites More sharing options...
vinaysaini Posted February 11, 2014 Author Share Posted February 11, 2014 Could not found any solution but in the end I had to use header('Location:'.$_SERVER['REQUEST_URI']); Obviously this will solve problem. After changing variable it will reload the page from server itself. Link to comment Share on other sites More sharing options...
Recommended Posts