nubekids Posted February 18, 2017 Share Posted February 18, 2017 Hi everyone, I dont seem to manage to hook the Facebook Like Box Block in the footer (only allowed in header & home) Has anyone managed to put it in the footer? thanks! Link to comment Share on other sites More sharing options...
PixGeek Posted February 19, 2017 Share Posted February 19, 2017 hi, Edit module file blockfacebook.php public function install() { return parent::install() && Configuration::updateValue('blockfacebook_url', 'https://www.facebook.com/prestashop') && $this->registerHook('displayHome') && $this->registerHook('displayHeader'); } By this one public function install() { return parent::install() && Configuration::updateValue('blockfacebook_url', 'https://www.facebook.com/prestashop') && $this->registerHook('displayHome') && $this->registerHook('displayFooter') && $this->registerHook('displayHeader'); } Then, Copy this code public function hookDisplayLeftColumn() { if ($this->page_name !== 'index') $this->_assignMedia(); return $this->hookDisplayHome(); } Modified by it public function hookDisplayFooter() { if ($this->page_name !== 'index') $this->_assignMedia(); return $this->hookDisplayHome(); } Insert this code just before protected function _assignMedia() { $this->context->controller->addCss(($this->_path).'css/blockfacebook.css'); $this->context->controller->addJS(($this->_path).'blockfacebook.js'); } There you go Then in your back office, graft the module in the footer Sorry for my english, i translated with google Good continuation 1 Link to comment Share on other sites More sharing options...
nubekids Posted February 19, 2017 Author Share Posted February 19, 2017 worked perfectly! Many thanks!! 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