okisam Posted February 8, 2013 Share Posted February 8, 2013 I created a hook and I want to move there a module. I override the FrontController.php within the override folder (override/clases/controller/FrontController.php). self::$smarty->assign(array( ‘HOOK_HEADER’ => Module::hookExec(‘header’), ‘HOOK_TOP’ => Module::hookExec(‘top’), ‘HOOK_NEWHOOK’ => Module::hookExec(‘DisplayNewHook’), ‘HOOK_LEFT_COLUMN’ => Module::hookExec(‘leftColumn’) )); Then I edited the php file module to add: function hookNewHook($params) { return $this->hookTop( $params ); } And it works correctly. But is not there another way to do this? Because if the module is updated, the changes will be lost. Thank you very much. Link to comment Share on other sites More sharing options...
be_tnt Posted February 9, 2013 Share Posted February 9, 2013 the only other way I know would be to create a new module based on the one you want to modify (in that way, in case of update of the original module), you will not lose your modification BUT you will not get the update of the module too. There is no way for the moment to override the module php file, which is pitty. Link to comment Share on other sites More sharing options...
okisam Posted February 9, 2013 Author Share Posted February 9, 2013 Thank you very much. It is very important for me to know that this is not possible. Greetings 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