dannyrippon Posted August 8, 2012 Share Posted August 8, 2012 Hi, Is there a way to add a new custom hook to a module without having to edit the module php file. If I edit the module php file, each time i upgrade the module my modifications will be deleted overwritten. I have added new hooks to the database and extended the FrontController, but I want to use these hooks with a number of modules but dont want to have to change each of the modules core php file. is there a way of overriding them or does anyone have any other suggestions? Thanks 1 Link to comment Share on other sites More sharing options...
perusi Posted August 13, 2012 Share Posted August 13, 2012 interested too... 'till now i've found no solution... so... i`m interested too Link to comment Share on other sites More sharing options...
elduderino Posted September 25, 2012 Share Posted September 25, 2012 you can override modules without editing core files...google it Link to comment Share on other sites More sharing options...
El Patron Posted September 25, 2012 Share Posted September 25, 2012 (edited) You can add the hook to the database either manually or using your module. Avoid using overrides at all costs. 1.4 INSERT INTO `ps_hook` (`name`, `title`, `description`) VALUES ('nameOfHook', 'Name Of Hook', 'It is a custom hook !'); Then registerHook Then as require dmodules hook priority. http://www.prestasho...e-install-1415/ Edited September 25, 2012 by elpatron (see edit history) 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