Jump to content

Disable Module Update Checks


Starky04

Recommended Posts

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

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 by S-HAMMANI (see edit history)
  • Like 2
Link to comment
Share on other sites

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

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

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

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

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;
                   }
  • Like 2
Link to comment
Share on other sites

  • 8 months later...

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

  • 6 months later...

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..)

 

r0kVg0G.png

 

Credits to http://nemops.com/faster-prestashop-back-office-modules-themes-ads/#.Veq5lpfQPgA

Edited by Enrique Gómez (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 1 month later...

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! :D

 

Cya!

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

  • 9 months later...

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! :D

 

Cya!

 

Great solution, GRAZIE teodoropiccinni!

Link to comment
Share on other sites

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

  • 4 years later...

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...