Jump to content

How can i add 2 buttons in two pages: homepage and product page


Recommended Posts

Hello. I have a problem how to detect is it product page. I wrote code for module. But it works only on homepage. For homepage i using hook "displayHomepage", but i didn't find this for product page. I added a new hook in my module. 

public function hookdisplayProductTab()
    {
        $this->context->controller->addJS($this->_path.'/views/js/back.js');
    }

But it didn't work. Also i added for product page:

$this->registerHook('displayProductTab') &&

I need to register this hook in another place too? Or can i add this buttons without creating a module?

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...