Avoiding conflict with MooTools

Automatic multi currency display on entire catalog.

Run your catalog in a main currency (or a main and alternate) with the customer having the option to turn on an additional currency throughout the Catalog, Cart and Checkout.
Post Reply
norman
Site Admin
Posts: 1238
Joined: Sat Feb 07, 2004 9:55 pm

Avoiding conflict with MooTools

Post by norman » Mon Feb 08, 2010 3:57 pm

The latest NorPrice uses jQuery to display the popup currency window. This may conflict with other JavaScript libraries. This isn't a problem usually as Actinic doesn't use any such libraries. However you may have added something that uses MooTools or similar.

To fix this do the following:

Make sure that in your overall layout the line “<actinic:variable name="NorPriceSupport" />” comes after your MooTools stuff. Just above </head> should do that.

Edit file greybox.js (in your Site folder).

Replace all occurrences of “$” with “jQuery”.

At the very top add the line:

$.noConflict();

This line should now be the only line with “$” in it.

Save the amended file.

See http://api.jquery.com/jQuery.noConflict/ for information on why this is needed.

An alternative might be to find a jQuery based way of doing what you’re doing. Then you'll only need one library loaded which will be more efficient.
Norman

Post Reply