Esempio n. 1
0
 public static function loadShoppergroups()
 {
     $option = JRequest::getCmd('option');
     $task = JRequest::getWord('task');
     $view = JRequest::getWord('view');
     if ($option == 'com_onepage' && ($task == 'opc' || $task == 'checkout')) {
         if (!class_exists('VmConfig')) {
             require JPATH_ADMINISTRATOR . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_virtuemart' . DIRECTORY_SEPARATOR . 'helpers' . DIRECTORY_SEPARATOR . 'config.php';
         }
         VmConfig::loadConfig();
         if (!class_exists('VirtueMartCart')) {
             require JPATH_SITE . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_virtuemart' . DIRECTORY_SEPARATOR . 'helpers' . DIRECTORY_SEPARATOR . 'cart.php';
         }
         $cart = VirtueMartCart::getCart(false);
         $euvatid = JRequest::getVar('eu_vat_id', '');
         if (is_array($cart->BT)) {
             if (isset($cart->BT['eu_vat_id'])) {
                 if ($cart->BT['eu_vat_id'] != $euvatid) {
                     $cart->BT['eu_vat_id'] = '';
                     $cart->setCartIntoSession();
                 }
             }
         }
     }
     require_once JPATH_SITE . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_onepage' . DIRECTORY_SEPARATOR . 'helpers' . DIRECTORY_SEPARATOR . 'loader.php';
     OPCloader::getSetShopperGroup(true);
 }