scraper Posted August 14, 2012 Share Posted August 14, 2012 Hi! I'm new to Prestashop, new to Smarty, new forum member and am writing my first post I'm trying to create a new hook in 1.5. I've googled it quite a bit and tried several guides for 1.4, but I feel all is different... some uses frontcontroller.php override, some does not. Some uses a "registerhook" somehow, some does not. All are sparsely described and none is for 1.5. What I want to do is to position blocklayerednavigation horizontally in category/product pages. I'm certain I'll be able to reformat the module itself, but first I need to position it using a new hook. I'd love to learn positioning the right way as I'm pretty picky when it comes to code... If not a detailed guide I'd love to be pointed in the correct direction. Link to comment Share on other sites More sharing options...
scraper Posted August 14, 2012 Author Share Posted August 14, 2012 (edited) Ok, I've worked a little more. In this guide this should be added to themodule.php: function hookNameOfHook($params){ return $this->processHook( $params,"NameOfHook");} but, when experimenting with Prestashop blocklinks module it returns a blank page. When checking the Apache error log: PHP Fatal error: Call to undefined method BlockLink::processHook() in... I changed the function to function hookNameOfHook($params) { return $this->hookLeftColumn($params); } which works, but doesn't seem right as I'm only copying the left column. Is this OK coding standard? :| Also, this tutorial says "registerHook" should run, but not the above guide. Is it necessary? Edited August 14, 2012 by scraper (see edit history) Link to comment Share on other sites More sharing options...
benjamin utterback Posted August 14, 2012 Share Posted August 14, 2012 Dear Scraper, Hello and welcome to the PrestaShop forums. We are happy to have you here. If you don't mind, I'm going to move this thread to the 1.5 section of the forums. I think you will find more relevant help over in that part of the forum. Thank you for choosing PrestaShop! -Benjamin 1 Link to comment Share on other sites More sharing options...
Recommended Posts