Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove override , when uninstalling the module in prestashop?

Am overriding the classes and controllers using my module. But when uninstalling it didn't remove the override files in override folder which are created using this module. because of this am getting an error "Unable to install override: Class CartOverrideOriginal does not exist" when am trying to install second time. can anyone help me, how to remove those files when uninstalling the module itself and not manually.. Do I need to write any function to achieve this?

like image 484
Manik Avatar asked Feb 15 '23 04:02

Manik


2 Answers

Please note that modules installation/uninstallation should be not creating or deleting files from classes and override folders. These folders has important files and accidentally it can cause to delete important files. So if your module needs to override some classes or controllers, then don't place those files programmatically in override folders. Your module installation instruction should tell the user to copy those files manually and the same for uninstallation.

Hope this will help you.

Thank you.

like image 197
Altaf Hussain Avatar answered Feb 17 '23 16:02

Altaf Hussain


You should delete manually the file from override folder. Than you should delete the contents of the cache folder.

Now you can reinstall your module that does the override.

like image 44
gncvalente Avatar answered Feb 17 '23 18:02

gncvalente