Jump to content

[SOLVED] Create a new hook / position


HaCos

Recommended Posts

in simple words:

 

1) create new hook for example: afterTop 

INSERT INTO `ps_hook` (`id_hook`, `name`, `title`, `description`, `position`, `live_edit`) VALUES (NULL, 'AfterTop', 'After the top', 'This hook displays content after the top hook', 1, 1); 

2) create function in your module to support this hook, 

public function hookAfterTop($params){
// do something
} 

3) transplant module to this new hook

  • Like 1
Link to comment
Share on other sites

in simple words:

 

1) create new hook for example: afterTop 

INSERT INTO `ps_hook` (`id_hook`, `name`, `title`, `description`, `position`, `live_edit`) VALUES (NULL, 'AfterTop', 'After the top', 'This hook displays content after the top hook', 1, 1); 

2) create function in your module to support this hook, 

public function hookAfterTop($params){
// do something
} 

3) transplant module to this new hook

Thanks, it works like a charm :) 

Link to comment
Share on other sites

  • 8 months later...

Am new to Prestashop , I want to create a new position in the footer.

 

New record added to the table "ps_hook", as mentioned above.  My question is To which module should i add this function to enable it in the back end.

 

And what else i have to do.

Thanks.

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