Product listing causes error on other modules

  • Posts: 43
  • Thank you received: 3
10 years 1 month ago #209625

-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.3
-- PHP version -- : 5.3.29
-- Browser(s) name and version -- : div

Hi Hika developers,

I´m using some other modules on my site, e.g. SJ HK Minicart and BM Slide Login and this custom code to display the active menu item of the main menu:

jQuery(document).ready(function($){
var url = window.location.href;
$('#gc-headmenu .menu li a').filter(function() {
return this.href == url;
}).addClass('active');
});

The Minicart and Slide Login module both use a slide functionality.
All these three modules work well on all pages except when a product listing page is displayed.
Both sliders - the one of the Minicart and the one of the Slide Login - do not work on a product listing page. Simultanously also the active menu item is not going to be highlighted on a product listing page.

Is there a javascript conflict somewhere?
Do you have any advice what I need to check in order to find the rootcause of this error?

Thanks.

Please Log in or Create an account to join the conversation.

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
10 years 1 month ago #209627

Hi,

If you have javascript conflict or javascript error ; you should be able to see it in your browser console.
And when you have a javascript error, the rest of the code below the error would not be processed.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: disc

Please Log in or Create an account to join the conversation.

  • Posts: 43
  • Thank you received: 3
10 years 1 month ago #209788

Thanks Jerome, that pointed me to the error: jQuery undefined.
In case the product listing is active the jQuery library is not loaded. That´s the reason why all three modules do not work on product listing pages. I understand that jQuery will be called by using JHtml::_('jquery.framework'); but I´´m not sure how to integrate this.
integrating jQuery into the templates index will call the library too late. It needs to be loaded prior to any other javascript.

Thanks.

Please Log in or Create an account to join the conversation.

  • Posts: 84305
  • Thank you received: 13700
  • MODERATOR
10 years 1 month ago #209798

Hi,

If you have issues with jQuery, the best is to try to install and setup the extension jQuery Easy.
It helps fixing jQuery issues on Joomla websites.

The following user(s) said Thank You: disc

Please Log in or Create an account to join the conversation.

  • Posts: 43
  • Thank you received: 3
10 years 1 month ago #210816

Perfect.
The extension jQuery Easy did exactly what I tried to fix manually and didn´t work - whatever the reason was.
Clean and smart tool - I can recommend it!

Please Log in or Create an account to join the conversation.

Time to create page: 0.058 seconds
Powered by Kunena Forum