Jump to content

Custom Module with javascript disrupting PS javascript


Recommended Posts

Hello,

 

I've created a custom module to create a new homepage layout for my customers site based on their requirements.

 

Here is my test environment.  www.dropinadventure.com/GCE_Final

 

This module uses a great deal of javascript which I have placed in my module structure:

 

modules/myslider/js

 

However now none of the presta shop javascript is functioning.  If you notice the menu item for "MINDMOBILE" it does nothing when you scroll over it.  It should have a dropdown as I've added a product and a thumbnail image.  Also when you click on the MINDMOBILE button to go to that page you will notice the left column 'Categories' block is not functioning properly.

 

I have my module hooked into the home hook as follows.

 

public function hookDisplayHome($params)
{

  $this->context->controller->addCSS($this->_path.'css/myslider.css', 'all');
  $this->context->controller->addjs($this->_path.'/js/jquery-1.9.1.min.js', 'all');
  $this->context->controller->addjs($this->_path.'jssor.core.js', 'all');
  $this->context->controller->addjs($this->_path.'js/jssor.utils.js', 'all');
  $this->context->controller->addjs($this->_path.'js/jssor.slider.js', 'all');
  $this->context->controller->addjs($this->_path.'js/mySlider.js', 'all');
  $this->context->smarty->assign(
      array(
          'my_module_name' => Configuration::get('MYMODULE_NAME'),
          'my_module_link' => $this->context->link->getModuleLink('myslider', 'display')
      )
  );
  return $this->display(__FILE__, 'myslider.tpl');
}
 

 

Does anyone know why this type javascript overthrow may be happening and how I can fix it so that all javascript executes?

 

Thank you

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