source/Core/UtilsCount.php
public function setVendorArticleCount($aCache, $sCatId, $sActIdent)
    {
        // if vendor/category name is 'root', skip counting
        if ($sCatId == 'root') {
            return 0;
        }

        $oArticle = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);
        $sTable = $oArticle->getViewName();

        // select each vendor articles count
        $sQ = "select $sTable.oxvendorid AS vendorId, count(*) from $sTable where ";
        $sQ .= "$sTable.oxvendorid <> '' and $sTable.oxparentid = '' and " . $oArticle->getSqlActiveSnippet() . " group by $sTable.oxvendorid ";
        $aDbResult = $this->getAssoc($sQ);

        foreach ($aDbResult as $sKey => $sValue) {
            $aCache[$sKey][$sActIdent] = $sValue;
        }

        $this->_setVendorCache($aCache);

        return isset($aCache[$sCatId][$sActIdent]) ? $aCache[$sCatId][$sActIdent] : 0;
    }
public function setVendorArticleCount($aCache, $sCatId, $sActIdent)
    {
        // if vendor/category name is 'root', skip counting
        if ($sCatId == 'root') {
            return 0;
        }

        $oArticle = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);
        $sTable = $oArticle->getViewName();

        // select each vendor articles count
        $sQ = "select $sTable.oxvendorid AS vendorId, count(*) from $sTable where ";
        $sQ .= "$sTable.oxvendorid <> '' and $sTable.oxparentid = '' and " . $oArticle->getSqlActiveSnippet() . " group by $sTable.oxvendorid ";
        $aDbResult = $this->getAssoc($sQ);

        foreach ($aDbResult as $sKey => $sValue) {
            $aCache[$sKey][$sActIdent] = $sValue;
        }

        $this->_setVendorCache($aCache);

        return isset($aCache[$sCatId][$sActIdent]) ? $aCache[$sCatId][$sActIdent] : 0;
    }
public function setVendorArticleCount ( $ aCache , $ sCatId , $ sActIdent ) { // if vendor/category name is 'root', skip counting if ( $ sCatId == 'root' ) { return 0 ; } $ oArticle = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ Article :: class ) ; $ sTable = $ oArticle -> getViewName ( ) ; // select each vendor articles count $ sQ = "select $sTable.oxvendorid AS vendorId, count(*) from $sTable where " ; $ sQ .= "$sTable.oxvendorid <> '' and $sTable.oxparentid = '' and " . $ oArticle -> getSqlActiveSnippet ( ) . " group by $sTable.oxvendorid " ; $ aDbResult = $ this -> getAssoc ( $ sQ ) ; foreach ( $ aDbResult as $ sKey => $ sValue ) { $ aCache [ $ sKey ] [ $ sActIdent ] = $ sValue ; } $ this -> _setVendorCache ( $ aCache ) ; return isset ( $ aCache [ $ sCatId ] [ $ sActIdent ] ) ? $ aCache [ $ sCatId ] [ $ sActIdent ] : 0 ; }
Saves and returns vendors category article count into cache

@param array  $aCache    Category cache data
@param string $sCatId    Unique vendor category ident
@param string $sActIdent Vendor category ID

@return int
Saves and returns vendors category article count into cache