require VMPATH_SITE . DS . 'helpers' . DS . 'shopfunctionsf.php'; } //dont remove that file it is actually in every view $_controller = vRequest::getCmd('view', vRequest::getCmd('controller', 'tsmart')); $trigger = 'onVmSiteController'; // $task = vRequest::getCmd('task',vRequest::getCmd('layout',$_controller) ); $this makes trouble! $task = vRequest::getCmd('task', ''); $session = JFactory::getSession(); $manage = vRequest::getCmd('manage', $session->get('manage', false, 'vm')); if (!$manage) { $session->set('manage', 0, 'vm'); } $feViews = array('askquestion', 'cart', 'invoice', 'pdf', 'pluginresponse', 'productdetails', 'recommend', 'vendor', 'vmplg'); $app = JFactory::getApplication(); if ($manage and $task != 'feed' and !in_array($_controller, $feViews)) { if (shopFunctionsF::isFEmanager()) { $session->set('manage', 1, 'vm'); vRequest::setVar('manage', '1'); vRequest::setVar('tmpl', 'component'); tsmConfig::loadJLang('com_virtuemart'); $jlang = JFactory::getLanguage(); $tag = $jlang->getTag(); $jlang->load('', JPATH_ADMINISTRATOR, $tag, true); tsmConfig::loadJLang('com_virtuemart'); $basePath = VMPATH_ADMIN; $trigger = 'onVmAdminController'; vmJsApi::jQuery(false); vmJsApi::loadBECSS(); $router = $app->getRouter(); $router->setMode(0); } else {