mdomski Posted October 13, 2015 Share Posted October 13, 2015 Hello I would like to know what's the best approach to:- add custom hook in desired place in template file, - override controller function (with awareness that other modules can do the same).For example I want to add some extra fields in renderStepOne function (AdminCarrierWizardController). I've done this by overriding AdminCarrierWizardController methods: renderStepOne and getStepOneFieldsValues with appropriate content without calling parent method because it's not possible. But what will happen if someone's else module will do the same or my module will override someone's else override (due to I have to copy AdminCarrierWizardController from my module to root->override->controllers->admin during installation). Is there simple way to modify carrier wizard behaviour just adding some necessary fields with hook or something? Another thing is I need to add my own hook in specific place for eg. in order-carrier template. Let's say I want to put something like this <td>{hook h='myHook'}</td> (additional table column for each delivery method) in delivery options table. So again I need to override core template. But what will happen if other module overrides this file? Can I add my simple line programmatically without inserting whole template code and overriding someone's else code? In brief: I want to add my own functionallity, let's say button which triggers map next to all of custom presta carriers which passes specific criteria without affecting other modules code. How it should be done when there're no in-built hooks? Regards Link to comment Share on other sites More sharing options...
vekia Posted January 7, 2016 Share Posted January 7, 2016 I would like to know what's the best approach to:- add custom hook in desired place in template file, free hooks manager module: create new hooks in prestashop how to use: Link to comment Share on other sites More sharing options...
JackiiBE Posted June 2, 2016 Share Posted June 2, 2016 I created a custom hook with this module. But the hook is not visible when positioning other modules? Prestashop v 1.6.1.5 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