Stellaractive Posted September 30, 2014 Share Posted September 30, 2014 Hi Guys, I will apologize in advance because I am sure this has been answered a bunch of times already, although I could not find an answer. I have modified a module to add a new hook. I need to make it so that the module can't be updated to delete this code, so what should I do? From my understanding, I can't do overrides for .php files. I tried to change file permissions on it to read only, but prestashop still managed to update it once. What do you guys do in this situation? thanks Link to comment Share on other sites More sharing options...
vekia Posted September 30, 2014 Share Posted September 30, 2014 it's not possible to override module .php file you can override only css/js/tpl files of module. in your case it's necessary to duplicate addon and change it's name to different one. Link to comment Share on other sites More sharing options...
Stellaractive Posted September 30, 2014 Author Share Posted September 30, 2014 Thanks Vekia, I was really hoping there was an easier solution, as I run into this extremely often. Link to comment Share on other sites More sharing options...
PhpMadman Posted September 30, 2014 Share Posted September 30, 2014 (edited) It will be possible in a later version of PrestaShop. Probably not 1.6.0.10. Pull request https://github.com/PrestaShop/PrestaShop/pull/2133 Patch for pull request https://github.com/PrestaShop/PrestaShop/commit/a21d2e9d0e7176bbfd005aac5825a6e1e6b718f0?diff=unified Second patch https://github.com/PrestaShop/PrestaShop/commit/2e5b54d138a47a411d73c97cf2f30be9e0dd8176 Edited September 30, 2014 by PhpMadman (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts