public function plgVmOnCheckoutAdvertise($cart, &$html) { // we will create hash only when cart view calls checkoutAdvertise if (method_exists('plgSystemOpc', 'registerCart')) { plgSystemOpc::registerCart(); } }
public static function loadJquery() { // stAn - this block will enable including newest jquery library, uncomment if needed $document = JFactory::getDocument(); $app = JFactory::getApplication(); $jq = $app->get('jquery', false); if (empty($jq)) { //jquery-1.11.0.min.js //$document->addScript('//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js'); //$document->addScript('//code.jquery.com/jquery-1.11.0.min.js'); $document->addScript('//code.jquery.com/jquery-latest.min.js'); JHTMLOPC::script('jquery-ui.min.js', 'components/com_onepage/themes/extra/jquery-ui/', false); JHTMLOPC::stylesheet('jquery-ui.min.css', 'components/com_onepage/themes/extra/jquery-ui/', false); //$document->addScript('//code.jquery.com/jquery-2.1.0.min.js'); $document->addScript('//code.jquery.com/jquery-migrate-1.2.1.min.js'); $app->set('jquery', true); $app->set('jquery-migrate', true); } /* $ui = $app->get('jquery-ui', false); if (empty($ui)) { $document->addScript( '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.16'); $app->set('jquery-ui', true); } */ $document = JFactory::getDocument(); $base = JURI::base(); $jbase = str_replace('/administrator', '', $base); if (substr($jbase, -1) !== '/') { $jbase .= '/'; } if (file_exists(JPATH_SITE . DS . 'components' . DS . 'com_virtuemart' . DS . 'assets' . DS . 'js' . DS . 'jquery.noConflict.js')) { $document->addScript($jbase . 'components/com_virtuemart/assets/js/jquery.noConflict.js'); } else { if (file_exists(JPATH_SITE . DS . 'components' . DS . 'com_virtuemart' . DS . 'assets' . DS . 'js' . DS . 'jquery.noconflict.js')) { $document->addScript($jbase . 'components/com_virtuemart/assets/js/jquery.noconflict.js'); } } if (class_exists('plgSystemOpc')) { plgSystemOpc::$opc_jquery_loaded = true; } // END of the block }