Jump to content

Hooking existing module to more different hooks


CrossY
 Share

Recommended Posts

Hi there,

 

I would like for the existing module "blockcmsinfo" to show on more pages, so I figured i'd update the hooks for the module.

 

I've edited the file "blockcmsinfo.php" in the module, to include 2 new texts:

$this->registerHook('productfooter'); &&

and 

	public function hookProductFooter($params)
	{
		$this->context->controller->addCSS($this->_path.'style.css', 'all');
		if (!$this->isCached('blockcmsinfo.tpl', $this->getCacheId()))
		{
			$infos = $this->getInfos($this->context->language->id, $this->context->shop->id);
			$this->context->smarty->assign(array('infos' => $infos, 'nbblocks' => count($infos)));
		}

		return $this->display(__FILE__, 'blockcmsinfo.tpl', $this->getCacheId());
	}

However, it gives me an white page as result, or a BOOLEAN error.

 

I'm not a programmer, but I can't see what else i'm missing here..

 

Any suggestions? Thanks in advance!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More