Jump to content

Overriding module to add new hook


speed3r

Recommended Posts

Hello,

 

I'm looking for a way to add new hook to ps module (blocklayered, blocksearch) without editing module core files, because they're replaced whenever you update module.

 

Is there any way to override module PHP file in PS1.5?

Is it possible to add new hook to a module using controllers/classes override?

Link to comment
Share on other sites

I'm familiar with developers guide.

 

There is described how to override a .tpl, .css or .js file, not a .php file. It's not even a formal override in terms of OO, it just links another file instead. Even if it was possible to replace a php file, it shouldn't be done this way.

 

Is there any other way to keep your module up-to-date without editing it's core file every update just to add one simple method containing new hook position?

Link to comment
Share on other sites

  • 4 weeks later...
  • 3 weeks later...

Hey,

 

sorry, I haven't solved that issue yet. As far as I know, it will require overriding module controller by adding a method to check for module's override before loading module. However, I'm pretty sure that will cause some problems with hooks, so I gave up on it for now - prestashop updates slowed down a bit recently.

Link to comment
Share on other sites

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