Meet Gavern and jQuery

Support help forum dedicated to free and commerical templates for Joomla 3 and 2.5 version.
GK User
Fri Jan 24, 2014 7:33 pm
I added a MijoShop/Opencart shop to my site and I had an issue with the cart buttons not working. In talking to their support they said it was because JQuery wasn't loading. Being a newbie I went ahead and got the extension jQuery Easy which allowed me to force the load and the buttons then worked. However, I asked them to look at the code to find out the cause and they pointed to code in the Meet Gavern theme which they tweaked for me. I just wanted to get the thoughts of the Gavick forum as to whether there was a better way other than changing the code to prevent this from happening. If I ever have to reload the template I don't want to run into the same issue. Below is what they changed.

I found that code in your template structure

// Rules to remove predefined jQuery and Bootstrap and MooTools More
GKParser::$customRules['/<script src="(.*?)media\/jui\/js\/jquery.min.js" type="text\/javascript"><\/script>/mi'] = '';
GKParser::$customRules['/<script src="(.*?)media\/jui\/js\/jquery-noconflict.js" type="text\/javascript"><\/script>/mi'] = '';
GKParser::$customRules['/<script src="(.*?)media\/jui\/js\/bootstrap.min.js" type="text\/javascript"><\/script>/mi'] = '';
//GKParser::$customRules['/<script src="(.*?)media\/system\/js\/mootools-more.js" type="text\/javascript"><\/script>/mi'] = '';

Trying to remove them without any additional affect on site.
User avatar
Fresh Boarder

GK User
Sat Jan 25, 2014 7:27 pm
Hello,

Could you provide an URL to your website?
User avatar
Administrator

GK User
Sat Jan 25, 2014 11:24 pm
dziudek wrote:Hello,

Could you provide an URL to your website?


I don't have the DNS pointing to it yet so it's located here. http://173.199.188.36/~printtra/

The MijoShop is located off the "Purchase" link.

Thanks,

Noal
User avatar
Fresh Boarder

GK User
Sun Jan 26, 2014 1:15 pm
Your problem is caused by fact that jQuery is loaded too late - please look at this file: https://github.com/GavickPro/Meet-Gaver ... efault.php

as you can see there are the following lines:

Code: Select all
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script type="text/javascript">jQuery.noConflict();</script>


most probably these lines doesn't exist in your file.
User avatar
Administrator


cron