Jump to content

hookdisplayHeader not inserting JS at Product Page PS 1.7.2.2


Recommended Posts

Hello,

I am facing a problem at PS 1.7.2.2 where I wanted to use Javascript files for my module.

But the above hook does not include any JS file to the Products Page (but CSS files are added). But it works for the ProductList and other pages, where I use it.

Do I need to use another hook for including the JS files after JQuer Core has been included for the Product Page?

 

public function hookdisplayHeader( $params )
    {

            $this->context->controller->registerJavascript('modules-mymod1', 'modules/'.$this->name.'/views/js/myjs1.js', array('position' => 'bottom', 'priority' => 100));
            $this->context->controller->registerJavascript('modules-mymod2', 'modules/'.$this->name.'/views/js/myJS.js',  array('position' => 'bottom', 'priority' => 150));

}

 

Many Thanks in advance

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