VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: mohammadkiani on January 17, 2014, 20:06:39 PM

Title: how to update virtuemart jquery?
Post by: mohammadkiani on January 17, 2014, 20:06:39 PM
hi everybody
i installed joomla 2.5 and virtuemart 2.0.26.
i have a module that need minimum jquery 1.7; but virtuemart jquery is 1.6. also i need ajax add to card and don't use jquery 1.7 by template.

how to do?
Title: Re: how to update virtuemart jquery?
Post by: jjk on January 17, 2014, 21:40:31 PM
A workaround you can try is to enable 'Use external google jQuery library' in VM2 'Configuration > Templates' tab. By default this is set to jQuery 1.6.4 in the file yourdomain\administrator\components\com_virtuemart\helpers\config.php approximately line 1385 in VM 2.0.26d. Last time I looked, Google hosted the following versions: 2.0.3, 2.0.2, 2.0.1, 2.0.0, 1.10.2, 1.10.1, 1.10.0, 1.9.1, 1.9.0, 1.8.3, 1.8.2, 1.8.1, 1.8.0, 1.7.2, 1.7.1, 1.7.0, 1.6.4, 1.6.3, 1.6.2, 1.6.1, 1.6.0, 1.5.2, 1.5.1, 1.5.0, 1.4.4, 1.4.3, 1.4.2, 1.4.1, 1.4.0, 1.3.2, 1.3.1, 1.3.0, 1.2.6, 1.2.3.

I didn't test if it is possible to use a 'Joomla template override' (a duplicate file that doesn't get overwritten upon updates)  for the config.php. If not, any change of the original file will be overwritten when you update VirtueMart. Note that the VirtueMart fancybox (lightbox) in VM2 doesn't work with jQuery 1.9 or higher.

VirtueMart 2.2 will probably use jQuery 1.9 and a different lightbox solution.
Title: Re: how to update virtuemart jquery?
Post by: jenkinhill on January 18, 2014, 00:00:46 AM
You can use jQuery 1.7.1 and retain VirtueMart 2.0.x functions and this also works fine with bootstrap if using a responsive template, and does not cause an error as is seen with VM's jQ1.6.4

The way I have used it is to first turn off jQuery loading in VM Configuration/templates by disabling  "Using the VirtueMart jQuery" and "Use external google jQuery library"
Then I FTP the new jQuery 1.7.1 version into a new subdirectory off the Joomla root and called the file jquery-min.js

Finally I edited the Joomla template index.php to add the following two jQ files in the header before the code in the head which  includes the other (normal) JavaScript files
<script src="/pathtojQ1.7.1/jquery-min.js" type="text/javascript"></script>
<script src="/components/com_virtuemart/assets/js/jquery.noConflict.js" type="text/javascript"></script>

Thus the jQ update does not get overwritten when VirtueMart is updated.
Title: Re: how to update virtuemart jquery?
Post by: mohammadkiani on January 24, 2014, 15:27:16 PM
thanks you
but any solution not worked.