- Posts: 43
- Thank you received: 3
Product listing causes error on other modules
11 years 2 months ago #209625
by disc
Product listing causes error on other modules was created by disc
-- 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.
-- 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.
11 years 2 months ago #209627
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Product listing causes error on other modules
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,
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.
The following user(s) said Thank You: disc
Please Log in or Create an account to join the conversation.
11 years 2 months ago #209788
by disc
Replied by disc on topic Product listing causes error on other modules
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.
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.
11 years 2 months ago #209798
by nicolas
Replied by nicolas on topic Product listing causes error on other modules
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.
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.
11 years 2 months ago #210816
by disc
Replied by disc on topic Product listing causes error on other modules
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!
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.182 seconds