News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

conflict jquery and (mootools) in VM2 and joomla 1.7

Started by nixtuan, October 29, 2011, 05:19:16 AM

Previous topic - Next topic

nixtuan

hi every body,
I have met the problem that when I go to cart page. All function of joomla page doesn't work.
I figure out that the problem come from the conflicting of jquery.

My solution is:
comment the codes bellow from this file: administrator\components\com_virtuemart\helpers\config.php
function jQuery() {
      
      // if ( !VmConfig::get('jquery',true ) && JFactory::getApplication()->isSite()) return false;
      // static $jquery;
      // // If exist exit
      // if ($jquery) return;
      // $document = JFactory::getDocument();
      // if(VmConfig::get('google_jquery',true)){
         // $document->addScript('//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js');
         // $document->addScript('//ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js');
      // } else {
         // $document->addScript(JURI::root(true).'/components/com_virtuemart/assets/js/jquery.min.js');
         // $document->addScript(JURI::root(true).'/components/com_virtuemart/assets/js/jquery-ui.min.js');
      // }

      // //JHTML::script('jquery.min.js', '//ajax.googleapis.com/ajax/libs/jquery/1.6.1/';, false);
      // /*$document = JFactory::getDocument();
      // $document->addScriptDeclaration('jQuery.noConflict();');*/

      // $jquery = true;
      
      return true;
   }

happy coding!

Milbo

sorry this is absolutly stupid solution. You can exactly do this just with a config setting. Please learn first the possibilities of the configuration.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

algisinfo

I know this is an old post, but having the same problem and found it searching for a solution.
Can you please explain what has to be done in the configuration to run jQuery in a way that is not conflicting with mootools ?
And why isn't that the default setting ?

Cleanshooter

- Cleanshooter