Jump to content

Transplanting Module to Custom Hook


TDarko

Recommended Posts

Hi ive created a custom hook called : "UserAccBottomBlock" in the "my-account.tpl" file.

with this code: {hook h="UserAccBottomBlock"}

 

and i want to add a module in there, in this case the best-sellers module that is shown on the homepage (not the one in the right or left column But the full width one.) I noticed that since the files for the modules are no longer php but tpl as well, i cant utilize the same directions as for the prestashop 1.5?

 

How can i add that module to the new hook that has been made?

 

Please let me know asap as ive been trying to find an answer for this for days now, without luck.

 

EDIT: Never mind i managed to figure it out. For people with similar issues, i was looking for the php files in the theme folder rather than the main dir module folder.

Edited by TDarko (see edit history)
Link to comment
Share on other sites

Anyone that can help me out?

 

its a fairly simple thing isnt it?

 

the prestashop  [support pages](http://doc.prestashop.com/display/PS16/Front-office+Positions) for prestashop it says to change the function line to the right hook wanted, or to add in another function line. But the modules have no longer any function lines.

 

So Ive been stuck with just trying to understand how to do something like this, and would truly really appreciate anyone that can help me out by even just linking me a site where i can find the information.

I just need to see an example of this so that i can understand this as soon as possible and get going on what i want to do with the cms.

Link to comment
Share on other sites

To hook a module in a custom hook one option I've used is in the installation method of that module add the standard registerhook

 

 $this->registerHook('UserAccBottomBlock')

 

And of course implement that hook in the module

 

public functon hookUserAccBottomBlock(){

       return some html;

}

Link to comment
Share on other sites

×
×
  • Create New...