naykel Posted November 21, 2012 Share Posted November 21, 2012 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 More sharing options...
El Patron Posted November 21, 2012 Share Posted November 21, 2012 You would need to modify the module and add that hook to the code. A module will not hook to a position that it is not coded for. 1 Link to comment Share on other sites More sharing options...
naykel Posted November 22, 2012 Author Share Posted November 22, 2012 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 More sharing options...
manch84 Posted November 23, 2012 Share Posted November 23, 2012 You would need to modify the module and add that hook to the code. A module will not hook to a position that it is not coded for. Is there any chance to give us more details about how to do that? Any tutorials? Thank you in advanced! Link to comment Share on other sites More sharing options...
yaniv14 Posted November 23, 2012 Share Posted November 23, 2012 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 More sharing options...
El Patron Posted November 23, 2012 Share Posted November 23, 2012 The best way outside of reading the developers guide is to just take a look at native PS modules. They are very well coded and follow PS standards. After that if you have a specific question just post it. Cheers, Fred Link to comment Share on other sites More sharing options...
naykel Posted November 27, 2012 Author Share Posted November 27, 2012 Thanks for the help Link to comment Share on other sites More sharing options...
Recommended Posts