nathanrobjohn Posted June 6, 2013 Share Posted June 6, 2013 Hi guys, I am new to prestashop and i have been asked by a client to integrate his theme into prestashop i have created a new theme and implemented bootstrap. I have also disabled all addons, now my question is i'm looking to instead of using hook right etc i want to use my own hooks for each module which i only need around 6 so etc hook block currency, hook home slider, hook advert, hook user info. i have read a tutorial by Nemo who uses for the forums and i have created this in my header.tpl <section class="currency">{hook h='hookcurrency'}</section> then this inside my blockcurrencies.php public function install() { return parent::install() && $this->registerHook('top') && $this->registerHook('header') && $this->registerHook('hookcurrency'); } public function hookTop($params) { if ($this->_prepareHook($params)) return $this->display(__FILE__, 'blockcurrencies.tpl'); } public function hookHeader($params) { if (Configuration::get('PS_CATALOG_MODE')) return; $this->context->controller->addCSS(($this->_path).'blockcurrencies.css', 'all'); } public function hookhookcurency($params) { return $this->display(__FILE__, 'blockcurrencies.tpl'); } } I'm not sure if i'm going the right way to themeing this by giving modules its own hook but i think that's the simplest way to position them in the right place and to style them also my hook appears in the backend i have reset the block currency module and then tried transplanting it to hook currency but for some reason it already says module has already been transplanted? but does not show up 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