source/Application/Model/ArticleList.php
public function loadCategoryArticles($sCatId, $aSessionFilter, $iLimit = null)
    {
        $sArticleFields = $this->getBaseObject()->getSelectFields();

        $sSelect = $this->_getCategorySelect($sArticleFields, $sCatId, $aSessionFilter);

        // calc count - we can not use count($this) here as we might have paging enabled
        // #1970C - if any filters are used, we can not use cached category article count
        $iArticleCount = null;
        if ($aSessionFilter) {
            $iArticleCount = \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->getOne($this->_getCategoryCountSelect($sCatId, $aSessionFilter));
        }

        if ($iLimit = (int) $iLimit) {
            $sSelect .= " LIMIT $iLimit";
        }

        $this->selectString($sSelect);

        if ($iArticleCount !== null) {
            return $iArticleCount;
        }

        // this select is FAST so no need to hazzle here with getNrOfArticles()
        return \OxidEsales\Eshop\Core\Registry::getUtilsCount()->getCatArticleCount($sCatId);
    }
public function loadCategoryArticles($sCatId, $aSessionFilter, $iLimit = null)
    {
        $sArticleFields = $this->getBaseObject()->getSelectFields();

        $sSelect = $this->_getCategorySelect($sArticleFields, $sCatId, $aSessionFilter);

        // calc count - we can not use count($this) here as we might have paging enabled
        // #1970C - if any filters are used, we can not use cached category article count
        $iArticleCount = null;
        if ($aSessionFilter) {
            $iArticleCount = \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->getOne($this->_getCategoryCountSelect($sCatId, $aSessionFilter));
        }

        if ($iLimit = (int) $iLimit) {
            $sSelect .= " LIMIT $iLimit";
        }

        $this->selectString($sSelect);

        if ($iArticleCount !== null) {
            return $iArticleCount;
        }

        // this select is FAST so no need to hazzle here with getNrOfArticles()
        return \OxidEsales\Eshop\Core\Registry::getUtilsCount()->getCatArticleCount($sCatId);
    }
public function loadCategoryArticles ( $ sCatId , $ aSessionFilter , $ iLimit = null ) { $ sArticleFields = $ this -> getBaseObject ( ) -> getSelectFields ( ) ; $ sSelect = $ this -> _getCategorySelect ( $ sArticleFields , $ sCatId , $ aSessionFilter ) ; // calc count - we can not use count($this) here as we might have paging enabled // #1970C - if any filters are used, we can not use cached category article count $ iArticleCount = null ; if ( $ aSessionFilter ) { $ iArticleCount = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) -> getOne ( $ this -> _getCategoryCountSelect ( $ sCatId , $ aSessionFilter ) ) ; } if ( $ iLimit = ( int ) $ iLimit ) { $ sSelect .= " LIMIT $iLimit" ; } $ this -> selectString ( $ sSelect ) ; if ( $ iArticleCount !== null ) { return $ iArticleCount ; } // this select is FAST so no need to hazzle here with getNrOfArticles() return \ OxidEsales \ Eshop \ Core \ Registry :: getUtilsCount ( ) -> getCatArticleCount ( $ sCatId ) ; }
Loads articles for the give Category

@param string $sCatId         Category tree ID
@param array  $aSessionFilter Like array ( catid => array( attrid => value,...))
@param int    $iLimit         Limit

@return integer total Count of Articles in this Category
Loads articles for the give Category