cocothecat Posted May 29, 2012 Share Posted May 29, 2012 I bought a module from the prestashop add ons, and despite allowing me to transplant the hook to the right it does not display in the right column only the left. I paid over £80 for the module and not really impressed as the devloper has a lack of support, is there a way for me to modify the module to get it to display on the right hook? I tried renaming Left to Right but that did not seem to work. Thanks in advance Link to comment Share on other sites More sharing options...
dhada Posted May 29, 2012 Share Posted May 29, 2012 modify the module and registered it in rightColumn !$this->registerHook('rightColumn') OR function hookRightColumn($params) { } 1 Link to comment Share on other sites More sharing options...
cocothecat Posted May 29, 2012 Author Share Posted May 29, 2012 where would you suggest to add that line of code!? Link to comment Share on other sites More sharing options...
codegrunt Posted May 29, 2012 Share Posted May 29, 2012 where would you suggest to add that line of code!? I think that mapetshi was giving you a general explanation as opposed to exact code as this is the development forum so a certain knowledge level is going to be expected. Two things to check first: 1. force compile needs to be on while testing 2. view source of the rendered page to make sure it is not a CSS issue causing the block to not render correctly If it is not present at all then it may be a missing hook method. Somewhere in the module source it will have a method that handles the initial registration of the hook it uses and then a method that handles the hook call. For example, the "blockmyaccount" module does this: public function install() { if (!$this->addMyAccountBlockHook() OR !parent::install() OR !$this->registerHook('leftColumn') OR !$this->registerHook('header')) return false; return true; } public function hookLeftColumn($params) { global $smarty; if (!$params['cookie']->isLogged()) return false; $smarty->assign(array( 'voucherAllowed' => (int)(Configuration::get('PS_VOUCHERS')), 'returnAllowed' => (int)(Configuration::get('PS_ORDER_RETURN')), 'HOOK_BLOCK_MY_ACCOUNT' => Module::hookExec('myAccountBlock') )); return $this->display(__FILE__, $this->name.'.tpl'); } public function hookRightColumn($params) { return $this->hookLeftColumn($params); } So upon install it associates itself with the leftColumn hook. It also includes two methods to handle either the right or left column hook call, the right column one just calls the left column method. So in your case, you would need to add a method for the missing hook if that is the problem. Cheers 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now