Jump to content

Guidance on installing some js script


Recommended Posts

You write a new module for that. And there you can define what kind of js or css you want to add. Simple example from blockcart.php.

    public function hookHeader()
    {
        if (Configuration::get('PS_CATALOG_MODE'))
            return;

        $this->context->controller->addCSS(($this->_path).'blockcart.css', 'all');
        if ((int)(Configuration::get('PS_BLOCK_CART_AJAX')))
        {
            $this->context->controller->addJS(($this->_path).'ajax-cart.js');
            $this->context->controller->addJqueryPlugin(array('scrollTo', 'serialScroll', 'bxslider'));
        }
    }
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...