Jump to content

Use front-page footer in 1.6 on all pages.


Recommended Posts

I would like to put this area on product-page and category-page:

6OKj2.jpg

 

I understand there are three different modules used here, but how can I position them above the footer on the other pages I mentioned?

 

The transplant a module doesn't let me transplant any of the modules where I want them..

Link to comment
Share on other sites

That is the CMS information block :) It can only hook to the homepage by default, so you need to clone/call this method to other hooks if you want it to appear in other pages

	public function hookHome($params)
	{
		$this->context->controller->addCSS($this->_path.'style.css', 'all');
		if (!$this->isCached('blockcmsinfo.tpl', $this->getCacheId()))
		{
			$infos = $this->getListContent($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());
	}

Like

public function hookFooterProduct($params)
	{
		return $this->hookHome($params);
	}

Link to comment
Share on other sites

Thank you!

 

Can you tell me which files I should look up?

 

I tried this in the blockcmsinfo.php:

public function hookHome($params)
    {
        $this->context->controller->addCSS($this->_path.'style.css', 'all');
        if (!$this->isCached('blockcmsinfo.tpl', $this->getCacheId()))
        {
            $infos = $this->getListContent($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());
    }
    
    public function hookFooterProducts($params)
    {
        return $this->hookHome($params);
    }

And then go to admin->modules->transplant a module, and put the CMS Info Block into displayFooterProduct..

 

But no luck :(

 

What did I do wrong?

Edited by Gomlers (see edit history)
Link to comment
Share on other sites

Thank you!

 

Can you tell me which files I should look up?

 

I tried this in the blockcmsinfo.php:

public function hookHome($params)
    {
        $this->context->controller->addCSS($this->_path.'style.css', 'all');
        if (!$this->isCached('blockcmsinfo.tpl', $this->getCacheId()))
        {
            $infos = $this->getListContent($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());
    }
    
    public function hookFooterProducts($params)
    {
        return $this->hookHome($params);
    }

And then go to admin->modules->transplant a module, and put the CMS Info Block into displayFooterProduct..

 

But no luck :(

 

What did I do wrong?

 

displayFooterProduct is not displayFooter hook :-)

select correct hook :)

Link to comment
Share on other sites

Ok - now I am a little confused :)

 

I tried removing the s as you said Nemo1, and then hook it to displayFooterProduct.

This still didn't work.

 

So I tried changing the code into this instead:

        public function hookFooter($params)
    {
        return $this->hookHome($params);
    }

And then I hooked the module into displayFooter

 

This worked - but the result came out like this:

 

oYOGV.jpg

 

What I actually want, is to have the facebook-block and the cms-info-block on every page at the bottom - just as it is on the homepage of the default 1.6-theme. And then I can use the transplant tool, to remove it from the checkout/shoppingcart and other pages I don't want it to show.

 

I believe it should be above the footer when I understand how the footer-hooks works.

 

My apologize for not beeing more spesific.

 

Still appreciating your help though :)

Link to comment
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
×
×
  • Create New...