Jump to content

override multiple times the same class


Radu

Recommended Posts

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

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

  • 4 months later...

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

  • 1 year later...
  • 3 weeks later...

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

 

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

  • 8 months later...
  • 2 years later...

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