Ejemplo n.º 1
0
    if ($format != 'final' && $layout != 'receipt') {
        /*
         * get redSHOP Google Analytics Plugin is Enable?
         * If it is Disable than load Google Analytics From redSHOP
         */
        $isredGoogleAnalytics = JPluginHelper::isEnabled('system', 'redgoogleanalytics');
        if (!$isredGoogleAnalytics && GOOGLE_ANA_TRACKER_KEY != "") {
            require_once JPATH_COMPONENT . '/helpers/google_analytics.php';
            $google_ana = new googleanalytics();
            $anacode = $google_ana->placeTrans();
        }
    }
}
if (PORTAL_SHOP == 1) {
    if ($controller == 'product' && $productid > 0 && $user->id > 0) {
        $checkcid = $helper->getShopperGroupProductCategory($productid);
        if ($checkcid == true) {
            $controller = 'login';
            JRequest::setVar('view', 'login');
            JRequest::setVar('layout', 'portal');
            $app->enqueuemessage(JText::_('COM_REDSHOP_AUTHENTICATIONFAIL'));
        }
    } elseif ($controller == 'category' && $categoryid > 0 && $user->id > 0) {
        $checkcid = $helper->getShopperGroupCategory($categoryid);
        if ($checkcid == "") {
            $controller = 'login';
            JRequest::setVar('view', 'login');
            JRequest::setVar('layout', 'portal');
            $app->enqueuemessage(JText::_('COM_REDSHOP_AUTHENTICATIONFAIL'));
        }
    } else {