Jump to content

moving hooks


Recommended Posts

Hi All,

 

I am still new to the whole prestashop learning curves. I have got my head around the template system, css ,js but I am still struggling with the hook system.

 

I have read a whole heap of information regarding how to set them up and how to transplant them in the back office but I can't find any straight forward information as to how to move an existing module to an existing hook when it is not set up for that hook. With were I am in the whole prestashop experience I don't really have the need to create more hooks as there is already plenty available I just need to figure out how to use them.

 

For example I want to place the specials block in the home page center column and I also want it to appear in the categories page center column.

 

In saying this the main question i have is can modules be moved to any hook after the php has been set up correctly (use the above example) and what do I need to do to move modules to a hook that it is not set up for?

 

Thanks in advance

Link to comment
Share on other sites

I understand that the module needs to be coded for the hook but what I need to know is if it is possible to code any module for any hook (within reason).

 

I have read so many posts regarding this issue and due to my lack of knowledge I am struggling with it. I am currently learning about php and smarty so I understand that it is not something that can easily be explained to a newbie, so what I really need to know is if it is possible so I am not wasting time trying to learn something that can not be done.

 

If I could successfully move something I know I will be able to figure it out but until I have a win I will keep struggling with it.

 

Thanks again

Link to comment
Share on other sites

you will need to edit the php file of the module you want to hook and add:

 

 

public function hookLeftColumn($params)

{

return $this->hookRightColumn($params);

}

 

CHANGE THE "hookLeftColumn" to the hook you want, in the product page it call --> extraLeft & extraRight inside the center column

Link to comment
Share on other sites

×
×
  • Create New...