Ejemplo n.º 1
0
            $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 {
        $controller = 'login';
        JRequest::setVar('view', 'login');
        JRequest::setVar('layout', 'portal');
    }
} else {
    if ($controller == 'product' && $productid > 0 && $portal == 1) {
        $checkcid = $helper->getShopperGroupProductCategory($productid);
        if ($checkcid == true) {
Ejemplo n.º 2
0
 if (strstr($data_add, '{category_short_desc}')) {
     $cat_s_desc = $config->maxchar($row->category_short_description, CATEGORY_SHORT_DESC_MAX_CHARS, CATEGORY_SHORT_DESC_END_SUFFIX);
     $data_add = str_replace("{category_short_desc}", $cat_s_desc, $data_add);
 }
 if (strstr($data_add, '{category_total_product}')) {
     $totalprd = $producthelper->getProductCategory($row->category_id);
     $data_add = str_replace("{category_total_product}", count($totalprd), $data_add);
     $data_add = str_replace("{category_total_product_lbl}", JText::_('COM_REDSHOP_TOTAL_PRODUCT'), $data_add);
 }
 /*
  * category template extra field
  * "2" argument is set for category
  */
 $data_add = $producthelper->getExtraSectionTag($extraFieldName, $row->category_id, "2", $data_add);
 // Shopper group category ACL
 $checkcid = $objhelper->getShopperGroupCategory($row->category_id);
 $read_more = "<a href='" . $link . "'>" . JText::_('COM_REDSHOP_READ_MORE') . "</a>";
 $data_add = str_replace("{read_more}", $read_more, $data_add);
 $sgportal = $objhelper->getShopperGroupPortal();
 $portal = 0;
 if (count($sgportal) > 0) {
     $portal = $sgportal->shopper_group_portal;
 }
 if (PORTAL_SHOP == 1) {
     if ($checkcid != "") {
         $cat_detail .= $data_add;
     }
 } else {
     if ($portal == 1 && $checkcid != "") {
         $cat_detail .= $data_add;
     } elseif ($portal == 0) {