VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: P-solver on November 04, 2013, 20:38:18 PM

Title: $.noConflict problem with other plugins?
Post by: P-solver on November 04, 2013, 20:38:18 PM
Joomla: 2.5.0
VM:    2.0.24

site url: www.curre.se/qce
Login: user
Password: user

Hello,

Ok, I'm new to both Joomla and this forum and I feel that there's two interesting worlds i'm stepping in to :)

PROBLEM:
I've bought an finished template for joomla at a commercial site.
I've started to make som changes to it, and now trying to integrate VM into it also.

Unfortunatly it seems like one or more plugins that followed with my finished template are making VM not working quite correctly.

For example:
- When looking at a product the following error comes up in firebug:
TypeError: $.noConflict is not a function
<script type="text/javascript">$.noConflict();</script>

- When adding to cart the following happens:
{"basePrice":"1000,00 \u20ac","basePriceVariant":"1000,00 \u20ac","basePriceWithTax":"1210,00 \u20ac","discountedPriceWithoutTax":"1000,00 \u20ac","priceBeforeTax":"1000,00 \u20ac","salesPrice":"1210,00 \u20ac","taxAmount":"210,00 \u20ac","salesPriceWithDiscount":"","salesPriceTemp":"1210,00 \u20ac","unitPrice":null,"priceWithoutTax":"1000,00 \u20ac","discountAmount":"","variantModification":"","DBTax":"","Tax":"","VatTax":"1,00 \u20ac","DATax":""}

I've googled the problem and get the feeling that it has something to do with jquery and the use of the "$"-symbol.

Feel free to log on o the website if it can help you on the way in making my life a little more problem-free... (Se info in top of post)

QUESTIONS:
1. Can anyone help me figure out what causes the problem?
2. How do I solve it?

SOLUTION:
1. For the problem with $.noConflict I simply deleted the row containing:
<script type="text/javascript">jQuery.noConflict();</script>
in:
url\templates\my_template\index.php
(where "my_template" is the template in use)

Title: Re: $.noConflict problem with other plugins?
Post by: GJC Web Design on November 04, 2013, 21:55:54 PM
Hi,

the cart etc functions fine .. I would start with the Jqueryeasy plugin  http://extensions.joomla.org/extensions/core-enhancements/performance/jquery-scripts/18327

Just use the default settings and that should clear up the 2nd noConflict()

were are you seeing the 2nd "error"? - it is just the json post for the cart -

Cheers
Title: Re: $.noConflict problem with other plugins?
Post by: P-solver on November 05, 2013, 12:45:12 PM
JQuery easy plugin installed with following features:

Enable jQuery (frontend) jQuery
Enable jQuery (backend) jQuery

jQuery Version jQuery v1.7 (latest)
jQuery UI Version jQuery v1.8.17 (stable)
Theme Base
Protocol https

Still no change in the problem with the blank popup when pressing "add to cart".

But when I disable the "rokBox" plugin it seems like it works better. I will confirm this when I get home, since I dont have firebug on my computer at work.
Title: Re: $.noConflict problem with other plugins?
Post by: GJC Web Design on November 05, 2013, 13:40:38 PM
but the blank popup is just css - nothing to do with JS

see screens
you have white text on a white background





[attachment cleanup by admin]
Title: Re: $.noConflict problem with other plugins?
Post by: P-solver on November 05, 2013, 19:59:10 PM
You are right, thanks.
I will change the css so the text gets visible.

Unfortunately I'm still being bugged with

TypeError: $.noConflict is not a function

Any suggestions on how to debug this?
Title: Re: $.noConflict problem with other plugins?
Post by: GJC Web Design on November 05, 2013, 20:56:46 PM
just find where it's being inserted and remove...
Title: Re: $.noConflict problem with other plugins?
Post by: P-solver on November 05, 2013, 21:27:11 PM
Perfect, I've done so now, and adited my original post.

I now get another error when going to the cart from the popup (after added a product to the cart):

TypeError: $(...).chosen is not a function

Any ideas of solution for this one?
Title: Re: $.noConflict problem with other plugins? chosen is not a function
Post by: GJC Web Design on November 05, 2013, 21:32:26 PM
if your using jqueryeasy (would only use in the frontend btw)

add this line (copy/paste) to  Advanced Options Frontend (Expert users only)->Add Scripts

components/com_virtuemart/assets/js/chosen.jquery.min.js



Title: Re: $.noConflict problem with other plugins?
Post by: P-solver on November 16, 2013, 09:00:30 AM
Thank you GJC Web Design,

Problem solved!
Title: Re: $.noConflict problem with other plugins? chosen is not a function
Post by: GJC Web Design on November 16, 2013, 11:52:36 AM
added chosen is not a function to title - hopefully will be easier to search as have seen this on many VM's with jqueryeasy