Radu Posted November 6, 2012 Share Posted November 6, 2012 Hello to everybody, I noticed that when you override a class/method it goes smoothly and nice, but when a new module is installed that overrides the same class/method it will just overwrite the modifications. What solutions have you adopted in this case? Thank you Link to comment Share on other sites More sharing options...
Radu Posted November 6, 2012 Author Share Posted November 6, 2012 I just read on the documentation that from 1.5 each module can override the same class multiple times by placing the file in /override/classes of the module folder. There is only the issue when you want to override the same function from multiple modules but this can be solved in the future with new hooks or dynamic hooks build upon the function. (like it is now just for the functions: add, update, delete) Link to comment Share on other sites More sharing options...
Radu Posted March 7, 2013 Author Share Posted March 7, 2013 Most modules use the override method for changing how classes / controllers work. Unfortunately it seems it doesn't work in the long run when same modules are doing the same override over the same method. Other mechanisms should be developed such as filtering return of a function, dynamic hooks (which in some parts is already implemented). How do you resolve the issue of multiple overrides over the same method/function? Link to comment Share on other sites More sharing options...
Panagiotis Vagenas Posted November 10, 2014 Share Posted November 10, 2014 One year and a half later and no solution. I think this issue is pretty match critical. Link to comment Share on other sites More sharing options...
vekia Posted November 10, 2014 Share Posted November 10, 2014 i don't think so that this is an issue. this is how prestashop override system works in cases like that i create override file manually (with all necessary functions) and after that everything works well. Link to comment Share on other sites More sharing options...
oneyoney123 Posted November 30, 2014 Share Posted November 30, 2014 I think this is an issue. That is why so many addons are broken. Once two addons override same function, the website goes wrong. Even vQmod on Opencart is better than override system of Prestashop. Opencart's vQmod rarely goes wrong in my experience. I think override system of Prestashop is designed to customize for "Self Developer", not for modules or addons. Link to comment Share on other sites More sharing options...
vekia Posted November 30, 2014 Share Posted November 30, 2014 i don't think so that this is an issue. this is how prestashop override system works it's not a bug, or something to fix thing you need just need additional features in prestashop there are many little things like this one, but all of them arent bugs, they are just related to how the prestashop system works... Link to comment Share on other sites More sharing options...
Nicolas - Pliciweb Posted August 6, 2015 Share Posted August 6, 2015 Hi, for information, we have make a module wich help you. it be make for avoid this errors "Unable to install override: The method XXXX in the class YYY is already overridden" for more information you have link below : http://addons.prestashop.com/fr/outils-administration-modules-prestashop/20250-multi-override.html Link to comment Share on other sites More sharing options...
امیر Posted March 17, 2018 Share Posted March 17, 2018 this moudle is install in my site i can unistall this moudle? 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