Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Add Mootools
 
flowstack
Sr. Member
 
Avatar
Total Posts:  159
Joined:  2008-01-30
London, United Kingdom
 

I’ve tried adding mootools to my store by doing the following:

1. Downloaded mootools and placed it in /js/mootools/mootools.js.
2. Added the following line to /app/design/frontend/default/default/layout/page.xml:

<action method="addJs"><script>mootools/mootools.js</script></action>

However, a javascript error is being thrown:

‘window.addEvent is not a function’

I have double checked the page with Firebug and the function is definitely there.

Can anyone shed light on this?

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
ikonic
Jr. Member
 
Total Posts:  2
Joined:  2008-06-05
 

From what I understand, Mootools and Prototype often have conflicts. Magento uses Prototype by default. I’d assume it’s possible but not all that easy to replace Prototype with Mootools throughout the relevant Magento pages. But if you aren’t dead set on the speed and functionality boosts of Mootools you could probably accomplish similar Javascript behaviors using Prototype + Scriptaculous.

 
Magento Community Magento Community
Magento Community
Magento Community
 
jbh1
Jr. Member
 
Total Posts:  7
Joined:  2008-06-04
 

MooTools would probably be suitable as this software is a cud chewing cow
as is the support.

Less fancy stuff and more practical stuff like...I don’t know, use of data and customization.
Or an admin panel that doesn’t require a phd

Oh watch, now support will come. Get the flying monkeys after me. 2 days and still nothing. You cannot build something
without thinking of real world uses. The power of open source is not just in letting nerds with phd’s open it up and play with it. It’s in
empowering people to make changes easily. I develop software and it’s easy to do if you care enough.

But they don’t care enough.

 
Magento Community Magento Community
Magento Community
Magento Community
 
flowstack
Sr. Member
 
Avatar
Total Posts:  159
Joined:  2008-01-30
London, United Kingdom
 

Thanks to both you guys.

Looks like you are correct ikonic. I moved the inclusion on mootools.js to the top of the page.xml file, before the prototype files are included. This made my mootools code work but broke other things!

It’s a real pain because I’ve coded it all up in mootools and the behaviour is exactly what I want. Now I’ve got to go and learn Scriptalicious and do it all over again...oh well smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
lotusseedsD
Mentor
 
Avatar
Total Posts:  1144
Joined:  2007-08-31
 

Do you know how many Prototype features are implemented?  So far the obvious ones I know of is Checkout page; the Modern theme has a Tab in the product page but it’s not in Default theme.

As I get more comfortable working with Magento template, I’d been thinking to eliminate Prototype altogether for the next site. if it’s just the Checkout page, it will be easy to do.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ikonic
Jr. Member
 
Total Posts:  2
Joined:  2008-06-05
 

I was thinking the same. Much rather replace Prototype entirely if possible.

 
Magento Community Magento Community
Magento Community
Magento Community
 
alistek
Sr. Member
 
Total Posts:  293
Joined:  2008-04-02
Normal, IL
 

It is quite possible from what I understand, there have been posts about replacing with JQuery.  Anyways the main conflict with Prototype and other libraries tends to be it’s use of the $ sign as a prefix.  There is a function to remove it I believe but that I think would be the first step.

-Adam

 
Magento Community Magento Community
Magento Community
Magento Community
 
lorenzo01
Sr. Member
 
Avatar
Total Posts:  221
Joined:  2007-09-06
France
 

hello,
i’m very interresting in using mootools library , lightbox works fine but mootools cause conflict....is there a solution ? mootools is very impressive…

 
Magento Community Magento Community
Magento Community
Magento Community
 
flowstack
Sr. Member
 
Avatar
Total Posts:  159
Joined:  2008-01-30
London, United Kingdom
 

No solution at the moment.

I chose mootools because it looked very simple to use. I had the effects I needed up and running quickly, having never used it before.

Haven’t used Prototype or Scriptalicious but it looks a little more complicated. Probably once I get into it I will realise that is not the case.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top