VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: mm688 on October 08, 2013, 08:19:52 AM

Title: Warp 7 Js conflicts with latest version of Virtuemart 2.0.24 and Yoo Lava
Post by: mm688 on October 08, 2013, 08:19:52 AM
Hello,

http://www.yootheme.com/support/question/50417#answer-143198

I have virtuemart 2.0.24 on yoo_lava 1.0.3 (warp 7.1.7) with joomla 2.5.14

I turn off jQuery because Warp 7 already loaded and because the accordion joomla menu is not working on pages that the Virtumart js files are loaded.

It looks like that doesn't work anymore in recent versions of Virtuemart when I turn off jQuery, because of a bug.

[22:26:14,396] ReferenceError: jQuery is not defined @ /components/com_virtuemart/assets/js/vmsite.js:112
[22:26:14,411] ReferenceError: jQuery is not defined @ /components/com_virtuemart/assets/js/facebox.js:337
[22:26:14,411] ReferenceError: jQuery is not defined @ /components/com_virtuemart/assets/js/vmprices.js:150

But jquery is define by Warp 7 ?

How Do I Fix It?

Thanks for all,
Mathieu
Title: Re: Warp 7 Js conflicts with latest version of Virtuemart 2.0.24 and Yoo Lava
Post by: AH on October 08, 2013, 09:50:10 AM
You need to run virtuemart jquery

If there is a conflict with Warp 7 then that is unlikely to be solved by VM
Title: Re: Warp 7 Js conflicts with latest version of Virtuemart 2.0.24 and Yoo Lava
Post by: jenkinhill on October 08, 2013, 13:34:00 PM
jQuery must be loaded before the other VM js scripts load. That is what the error message is telling you.  VM does that automatically - unless you turn it off................
Title: Re: Warp 7 Js conflicts with latest version of Virtuemart 2.0.24 and Yoo Lava
Post by: mm688 on October 09, 2013, 19:05:28 PM
Hello,

<script src="/components/com_virtuemart/assets/js/vmsite.js" type="text/javascript"></script>
<script src="/components/com_virtuemart/assets/js/facebox.js" type="text/javascript"></script>
<script src="/components/com_virtuemart/assets/js/vmprices.js" type="text/javascript"></script>
<script src="/media/system/js/mootools-core.js" type="text/javascript"></script>
<script src="/media/system/js/core.js" type="text/javascript"></script>
<script src="/media/system/js/modal.js" type="text/javascript"></script>
<script src="/media/widgetkit/js/jquery.js" type="text/javascript"></script>
<script src="/cache/widgetkit/widgetkit-8b4450c4.js" type="text/javascript"></script>

How can I change the order ?

Thanks for all,
Mathieu
Title: Re: Warp 7 Js conflicts with latest version of Virtuemart 2.0.24 and Yoo Lava
Post by: jenkinhill on October 10, 2013, 00:06:02 AM
Turn on VM jQuery then it will laod before vmsite.js like this:

<script src="/vm24/components/com_virtuemart/assets/js/jquery.min.js" type="text/javascript"></script>
<script src="/vm24/components/com_virtuemart/assets/js/jquery.noConflict.js" type="text/javascript"></script>
<script src="/vm24/components/com_virtuemart/assets/js/vmsite.js" type="text/javascript"></script>

Disable the widgetkit jQuery or consider using jQueryEasy - http://forum.virtuemart.net/index.php?topic=111843.0
Title: Re: Warp 7 Js conflicts with latest version of Virtuemart 2.0.24 and Yoo Lava
Post by: avdfmedia on October 28, 2013, 19:10:44 PM
JenkinHill, thank you!

I too was running a yootheme template (nano3, with uikit -no widgetkit) and had the exact same problem as Mathew. If I disabled the Virtuemart jQuery in the BE, the 'add to cart' and 'quantity' functionalities were being lost. If I switched it on, they worked fine but then I had issues with my template such as dropdowns not working (e.g. my 'main accordion menu') etc. Through my reading I realized that this is very common with YooTheme templates and unfortunately no solution has been given yet by them (apparently the conflict existed for some time now, mostly with their widgedkit).

I just wanted to share my experience and how JenkinHill's solution above of simply installing the 'jQuery Easy', sorted all my problems out.
Once again, thanks