Starky04 Posted June 8, 2014 Share Posted June 8, 2014 I am working on a Prestashop installation for a client and I wish to disable the automatic module update checks. I have customised a couple of the modules and updating them would overwrite the my changes. Furthermore, when an update is available, the option to configure a module is replaced with the option to update it. This is very irritating, should users be forced to update modules before they can configure them? How do I disable the update checks? Link to comment Share on other sites More sharing options...
S-HAMMANI Posted June 8, 2014 Share Posted June 8, 2014 Hi you can desable automatically check for module updates in BO ADMINSTRATION > Preferences option > GENERAL > Automatically check for module updates=NO 1 Link to comment Share on other sites More sharing options...
Starky04 Posted June 8, 2014 Author Share Posted June 8, 2014 Thanks for your response. Unfortunately, I have already disabled this option in the Administration section to no effect. Is there some code I could just comment out to stop this from happening? Link to comment Share on other sites More sharing options...
S-HAMMANI Posted June 8, 2014 Share Posted June 8, 2014 (edited) this is the code to comment or remove in « admin/themes/default/templates/controllers/modules/page.tpl » line 70: {if $upgrade_available|@count} <div class="alert alert-info"> {l s='An upgrade is available for some of your modules!'} <ul> {foreach from=$upgrade_available item='module'} <li><a href="{$currentIndex|escape:'html':'UTF-8'}&token={$token|escape:'html':'UTF-8'}&anchor={$module.anchor|escape:'html':'UTF-8'}"><b>{$module.displayName|escape:'html':'UTF-8'}</b></a></li> {/foreach} </ul> </div> {/if} Edited June 8, 2014 by S-HAMMANI (see edit history) 2 Link to comment Share on other sites More sharing options...
Starky04 Posted June 9, 2014 Author Share Posted June 9, 2014 I want to stop the updates, not suppress alerts about them. There must some code in the back-end which updates config/xml/default_country_company_modules_list.xml but for the life of me I can't find it. Link to comment Share on other sites More sharing options...
vekia Posted June 9, 2014 Share Posted June 9, 2014 tools.php chaneg whole code to just return false Link to comment Share on other sites More sharing options...
Starky04 Posted June 11, 2014 Author Share Posted June 11, 2014 I found a better solution to this which doesn't involve touching the code. I've changed the permissions of the config/xml/default_country_modules_list.xml file to 444 so that it is read-only. This seems to have stopped Prestashop from updating it. I can make sure that the version numbers in this file match the current versions of the modules and then there is no option to update. Obviously this is an ugly hack but it is necessary until the following things are fixed: The ability to turn off the check for module updates The ability to configure modules with a pending upgrade - don't force the upgrade (I've noticed this is possible for some modules but not ones like the home slider) Thanks to everyone who has contributed. Link to comment Share on other sites More sharing options...
El Patron Posted June 11, 2014 Share Posted June 11, 2014 I found a better solution to this which doesn't involve touching the code. I've changed the permissions of the config/xml/default_country_modules_list.xml file to 444 so that it is read-only. This seems to have stopped Prestashop from updating it. I can make sure that the version numbers in this file match the current versions of the modules and then there is no option to update. Obviously this is an ugly hack but it is necessary until the following things are fixed: The ability to turn off the check for module updates The ability to configure modules with a pending upgrade - don't force the upgrade (I've noticed this is possible for some modules but not ones like the home slider) Thanks to everyone who has contributed. let us know if you notice a slow down in your back office. There have been others with slow back office that was related to these files not having write permission. Link to comment Share on other sites More sharing options...
Starky04 Posted June 11, 2014 Author Share Posted June 11, 2014 I've always found the back office to be a bit sluggish but this certainly hasn't made things any slower. It's only that one file which I set to read-only. Will let you know if things slow down. 1 Link to comment Share on other sites More sharing options...
S-HAMMANI Posted June 11, 2014 Share Posted June 11, 2014 I emptied array: $upgrade_available by adding $upgrade_available=array(); to file /controllers/admin/AdminModulesController.php in line ~1408; $upgrade_available=array(); // Init tpl vars for smarty $tpl_vars = array(); $tpl_vars['token'] = $this->token; $tpl_vars['upgrade_available'] = $upgrade_available; $tpl_vars['currentIndex'] = self::$currentIndex; ........ ........ Link to comment Share on other sites More sharing options...
S-HAMMANI Posted June 11, 2014 Share Posted June 11, 2014 OR comment this code in /classes/module/Module.php line ~ 1310: foreach ($module_list as $k => $m) if ($m->name == $modaddons->name && !isset($m->available_on_addons)) { $flag_found = 1; if ($m->version != $modaddons->version && version_compare($m->version, $modaddons->version) === -1) $module_list[$k]->version_addons = $modaddons->version; } 2 Link to comment Share on other sites More sharing options...
El Patron Posted June 11, 2014 Share Posted June 11, 2014 I've always found the back office to be a bit sluggish but this certainly hasn't made things any slower. It's only that one file which I set to read-only. Will let you know if things slow down. re sluggish, yea, no CCC of .js or .css files will do that all by itself. check this out, BoZoom Link to comment Share on other sites More sharing options...
Sharak Posted March 3, 2015 Share Posted March 3, 2015 Is there any final solution for this bug? Disabled module updates, disabled cache and forcing compile, but the updates still appear. No matter if it's store working for some time or fresh installation. Some modules' changes had to be done in core files and now each time my client updates a module (why is this default option instead Configuration!?), I have to apply all changes again and again. How to make it work? Link to comment Share on other sites More sharing options...
Enrique Gómez Posted September 5, 2015 Share Posted September 5, 2015 (edited) Get rid of addvertising and upgrades Prestashop 1.6.14 First override Tools.php change <?php class Tools extends ToolsCore { public static function addonsRequest($request, $params = array()) { return false; //no ads nor upgrades..nor? } } Then rename or delete the xml files (without the override they will be recreated automatically -> we will have the same problem again and again..) Credits to http://nemops.com/faster-prestashop-back-office-modules-themes-ads/#.Veq5lpfQPgA Edited September 5, 2015 by Enrique Gómez (see edit history) 1 Link to comment Share on other sites More sharing options...
teodoropiccinni Posted October 21, 2015 Share Posted October 21, 2015 I have solved it!!!! Just go to: /modules/modulename/modulename.php Search for: $this->version = 'xxxx'; inside the file modulename.php In order to disable updates for that particular module I have changed 'xxxx' from 2.0.13 to 999999.0.13, update message for that module disappear immediately. Hope that will help! Cya! 2 1 Link to comment Share on other sites More sharing options...
Coloranti Posted July 28, 2016 Share Posted July 28, 2016 I have solved it!!!! Just go to: /modules/modulename/modulename.php Search for: $this->version = 'xxxx'; inside the file modulename.php In order to disable updates for that particular module I have changed 'xxxx' from 2.0.13 to 999999.0.13, update message for that module disappear immediately. Hope that will help! Cya! Great solution, GRAZIE teodoropiccinni! Link to comment Share on other sites More sharing options...
Knowband Plugins Posted July 28, 2016 Share Posted July 28, 2016 The above solution might not help all the times if you include the following with the same then it will work better. Open file at below path: /modules/modulename/config.xml Replace <version><![CDATA[1.0.0]]></version> With <version><![CDATA[888.0.111]]></version> Link to comment Share on other sites More sharing options...
chirag_0110 Posted August 2, 2016 Share Posted August 2, 2016 Hi you can desable automatically check for module updates in BO ADMINSTRATION > Preferences option > GENERAL > Automatically check for module updates=NO Hi, I can't found this option in BO in prestashop 1.6.1.6. can anybody know where i find this option ? Link to comment Share on other sites More sharing options...
Knowband Plugins Posted August 2, 2016 Share Posted August 2, 2016 You can refer to this attached screenshot for the solution. Hope this helps you. Link to comment Share on other sites More sharing options...
chirag_0110 Posted August 2, 2016 Share Posted August 2, 2016 You can refer to this attached screenshot for the solution. Hope this helps you. Thanks Knowband. It's work for me. Link to comment Share on other sites More sharing options...
etherdolphin Posted September 25, 2020 Share Posted September 25, 2020 Hello everyone, I know, it is really late to partecipate this discussion. Just for future reference I'll provide my solution, in the awarness that it is strongly suggested to upgrade the shop modules, as it can most likely introduce security updates. For developers sometimes it is useful to prevent the upgrade, for example when one needs to apply some custom edit to the module's code written by other developers. For version 1.7 of Prestashop, the only thing that worked was to change the module version within the 'ps_module' table of the database: search for module within the coumn 'name' and set a version number greater than the current one. I just want to remark that this could be a dangerous practice in case you do not really know what you are doing, so, you are warned. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now