49         if ( !$aCatData || !isset( $aCatData[$sCatId][$sActIdent] ) ) {
 
   52             $iCnt = $aCatData[$sCatId][$sActIdent];
 
   74         if ( !$aCatData || !isset( $aCatData[$sCatId][$sActIdent] ) ) {
 
   77             $iCnt = $aCatData[$sCatId][$sActIdent];
 
   98         if ( !$aVendorData || !isset( $aVendorData[$sVendorId][$sActIdent] ) ) {
 
  101             $iCnt = $aVendorData[$sVendorId][$sActIdent];
 
  120         if ( !$aManufacturerData || !isset( $aManufacturerData[$sManufacturerId][$sActIdent] ) ) {
 
  123             $iCnt = $aManufacturerData[$sManufacturerId][$sActIdent];
 
  139         $oArticle = 
oxNew( 
'oxarticle' );
 
  140         $sTable   = $oArticle->getViewName();
 
  141         $sO2CView = getViewName( 
'oxobject2category' );
 
  145         $sQ = 
"SELECT COUNT( DISTINCT $sTable.`oxid` ) 
  147                    INNER JOIN $sTable ON $sO2CView.`oxobjectid` = $sTable.`oxid` AND $sTable.`oxparentid` = '' 
  148                WHERE $sO2CView.`oxcatnid` = " . $oDb->quote( $sCatId ) . 
" AND " . $oArticle->getSqlActiveSnippet();
 
  150         $aCache[$sCatId][$sActIdent] = $oDb->getOne( $sQ );
 
  153         return $aCache[$sCatId][$sActIdent];
 
  169         $oArticle = 
oxNew( 
'oxarticle' );
 
  170         $sTable   = $oArticle->getViewName();
 
  172         $sSelect  = 
"select count({$sTable}.oxid) from {$sTable} where oxvarminprice >= 0 ";
 
  173         $sSelect .= $dPriceTo ? 
"and oxvarminprice <= " . (double)$dPriceTo . 
" " : 
" ";
 
  174         $sSelect .= $dPriceFrom ? 
"and oxvarminprice  >= " . (double)$dPriceFrom . 
" " : 
" ";
 
  175         $sSelect .= 
"and {$sTable}.oxissearch = 1 and ".$oArticle->getSqlActiveSnippet();
 
  177         $aCache[$sCatId][$sActIdent] = 
oxDb::getDb()->getOne( $sSelect );
 
  180         return $aCache[$sCatId][$sActIdent];
 
  195         if ( $sCatId == 
'root' ) {
 
  199         $oArticle = 
oxNew( 
'oxarticle' );
 
  200         $sTable   = $oArticle->getViewName();
 
  203         $sQ  = 
"select $sTable.oxvendorid AS vendorId, count(*) from $sTable where ";
 
  204         $sQ .= 
"$sTable.oxvendorid <> '' and $sTable.oxparentid = '' and ".$oArticle->getSqlActiveSnippet().
" group by $sTable.oxvendorid ";
 
  207         foreach ( $aDbResult as $sKey => $sValue ) {
 
  208             $aCache[$sKey][$sActIdent] = $sValue;
 
  212         return $aCache[$sCatId][$sActIdent];
 
  227         if ( $sMnfId == 
'root' ) {
 
  231         $oArticle = 
oxNew( 
'oxarticle' );
 
  232         $sArtTable   = $oArticle->getViewName();
 
  233         $sManTable = getViewName(
'oxmanufacturers');
 
  237         $sQ = 
"select count($sArtTable.oxid) from $sArtTable where $sArtTable.oxparentid = '' and oxmanufacturerid = '$sMnfId' and ".$oArticle->getSqlActiveSnippet();
 
  241         $aCache[$sMnfId][$sActIdent] = (int) $iValue;
 
  245         return $aCache[$sMnfId][$sActIdent];
 
  258             $this->
getConfig()->setGlobalParameter( 
'aLocalCatCache', null );
 
  263             if ( isset( $aCatData[$sCatId] ) ) {
 
  264                 unset( $aCatData[$sCatId] );
 
  283             $sTable  = getViewName( 
'oxcategories' );
 
  284             $sSelect = 
"select $sTable.oxid from $sTable where " . (double)$iPrice . 
" >= $sTable.oxpricefrom and " . (
double)$iPrice . 
" <= $sTable.oxpriceto ";
 
  286             $rs = 
oxDb::getDb()->select( $sSelect, 
false, 
false );
 
  287             if ( $rs != 
false && $rs->recordCount() > 0 ) {
 
  288                 while ( !$rs->EOF ) {
 
  289                     if ( isset( $aCatData[$rs->fields[0]] ) ) {
 
  290                         unset( $aCatData[$rs->fields[0]] );
 
  314         $oArticle = 
oxNew(
"oxarticle");
 
  315         $sArticleTable  = $oArticle->getViewName();
 
  316         $sActiveSnippet = $oArticle->getSqlActiveSnippet();
 
  317         $sViewName = getViewName( 
'oxartextends', $iLang );
 
  319         $sQ = 
"select count(*) from {$sViewName} inner join {$sArticleTable} on ".
 
  320               "{$sArticleTable}.oxid = {$sViewName}.oxid where {$sArticleTable}.oxparentid = '' and {$sArticleTable}.oxissearch = 1 AND match ( {$sViewName}.oxtags ) ".
 
  321               "against( ".$oDb->quote( 
"\"".$sTag.
"\"" ).
" IN BOOLEAN MODE ) and {$sActiveSnippet}";
 
  323         return $oDb->getOne( $sQ );
 
  336             $this->
getConfig()->setGlobalParameter( 
'aLocalVendorCache', null );
 
  341             if ( isset( $aVendorData[$sVendorId] ) ) {
 
  342                 unset( $aVendorData[$sVendorId] );
 
  358         if ( !$sManufacturerId ) {
 
  359             $this->
getConfig()->setGlobalParameter( 
'aLocalManufacturerCache', null );
 
  364             if ( isset( $aManufacturerData[$sManufacturerId] ) ) {
 
  365                 unset( $aManufacturerData[$sManufacturerId] );
 
  382         $aLocalCatCache = 
$myConfig->getGlobalParameter( 
'aLocalCatCache' );
 
  385         if ( !$aLocalCatCache ) {
 
  387             if ( $sLocalCatCache ) {
 
  388                 $aLocalCatCache = $sLocalCatCache;
 
  390                 $aLocalCatCache = null;
 
  392             $myConfig->setGlobalParameter( 
'aLocalCatCache', $aLocalCatCache );
 
  394         return $aLocalCatCache;
 
  406         $this->
getConfig()->setGlobalParameter( 
'aLocalCatCache', $aCache );
 
  419         $this->
getConfig()->setGlobalParameter( 
'aLocalVendorCache', $aCache );
 
  432         $this->
getConfig()->setGlobalParameter( 
'aLocalManufacturerCache', $aCache );
 
  446         $aLocalVendorCache = 
$myConfig->getGlobalParameter(
'aLocalVendorCache');
 
  448         if ( !$aLocalVendorCache ) {
 
  450             if ( $sLocalVendorCache ) {
 
  451                 $aLocalVendorCache = $sLocalVendorCache;
 
  453                 $aLocalVendorCache = null;
 
  455             $myConfig->setGlobalParameter( 
'aLocalVendorCache', $aLocalVendorCache );
 
  457         return $aLocalVendorCache;
 
  470         $aLocalManufacturerCache = 
$myConfig->getGlobalParameter(
'aLocalManufacturerCache');
 
  472         if ( !$aLocalManufacturerCache ) {
 
  474             if ( $sLocalManufacturerCache ) {
 
  475                 $aLocalManufacturerCache = $sLocalManufacturerCache;
 
  477                 $aLocalManufacturerCache = null;
 
  479             $myConfig->setGlobalParameter( 
'aLocalManufacturerCache', $aLocalManufacturerCache );
 
  481         return $aLocalManufacturerCache;
 
  493         if ( $this->_sUserViewId != null && !$blReset ) {