Quite often when customizing your Prestashop you may need to modify the code of the default modules. Prestashop has recently opened the possibility to override modules. But unfortunately this feature still leaves much to be desired, that is why most of the developers still prefer to make changes in the code of the default modules. This article would be also useful for those, who are still using the old version of Prestashop and are using some custom modules.
This is how your admin panel looks like when there are modules which need to be updated.
The code, related to updates for modules is located in the following files:
- administration/themes/default/template/controllers/modules/list.tpl
- classes/controller/AdminController.php
- controllers/admin/AdminModulesController.php
If you wish to remove the Update button:
you need to edit the file: administration/themes/default/template/controllers/modules/list.tpl
by commenting these lines:
1 2 3 4 5 6 7 |
{* {if isset($module->version_addons) && $module->version_addons} <a class="btn btn-warning" href="{$module->options.update_url}"> <i class="icon-refresh"></i> {l s='Update it!'} </a> {else *} |
also override AdminController::isplayModuleOptions($module, $output_type = ‘link’, $back = null)
and comment the lines:
1 2 |
/*if (isset($module->version_addons) && $module->version_addons) $modules_options[] = $update;*/ |
If you wish to hide the list with the modules that require updates, then you need to override the file and clear the array $upgrade_available in the method initContent():
This is all, now it is impossible to update the module in the admin panel.