source/Application/Model/ArticleList.php
public function loadNewestArticles($iLimit = null)
    {
        //has module?
        $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();

        if (!$myConfig->getConfigParam('bl_perfLoadPriceForAddList')) {
            $this->getBaseObject()->disablePriceLoad();
        }

        $this->_aArray = [];
        switch ($myConfig->getConfigParam('iNewestArticlesMode')) {
            case 0:
                // switched off, do nothing
                break;
            case 1:
                // manually entered
                $this->loadActionArticles('oxnewest', $iLimit);
                break;
            case 2:
                $sArticleTable = getViewName('oxarticles');
                if ($myConfig->getConfigParam('blNewArtByInsert')) {
                    $sType = 'oxinsert';
                } else {
                    $sType = 'oxtimestamp';
                }
                $sSelect = "select * from $sArticleTable ";
                $sSelect .= "where oxparentid = '' and " . $this->getBaseObject()->getSqlActiveSnippet() . " and oxissearch = 1 order by $sType desc ";
                if (!($iLimit = (int) $iLimit)) {
                    $iLimit = $myConfig->getConfigParam('iNrofNewcomerArticles');
                }
                $sSelect .= "limit " . $iLimit;

                $this->selectString($sSelect);
                break;
        }
    }
public function loadNewestArticles($iLimit = null)
    {
        //has module?
        $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();

        if (!$myConfig->getConfigParam('bl_perfLoadPriceForAddList')) {
            $this->getBaseObject()->disablePriceLoad();
        }

        $this->_aArray = [];
        switch ($myConfig->getConfigParam('iNewestArticlesMode')) {
            case 0:
                // switched off, do nothing
                break;
            case 1:
                // manually entered
                $this->loadActionArticles('oxnewest', $iLimit);
                break;
            case 2:
                $sArticleTable = getViewName('oxarticles');
                if ($myConfig->getConfigParam('blNewArtByInsert')) {
                    $sType = 'oxinsert';
                } else {
                    $sType = 'oxtimestamp';
                }
                $sSelect = "select * from $sArticleTable ";
                $sSelect .= "where oxparentid = '' and " . $this->getBaseObject()->getSqlActiveSnippet() . " and oxissearch = 1 order by $sType desc ";
                if (!($iLimit = (int) $iLimit)) {
                    $iLimit = $myConfig->getConfigParam('iNrofNewcomerArticles');
                }
                $sSelect .= "limit " . $iLimit;

                $this->selectString($sSelect);
                break;
        }
    }
public function loadNewestArticles ( $ iLimit = null ) { //has module? $ myConfig = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) ; if ( ! $ myConfig -> getConfigParam ( 'bl_perfLoadPriceForAddList' ) ) { $ this -> getBaseObject ( ) -> disablePriceLoad ( ) ; } $ this -> _aArray = [ ] ; switch ( $ myConfig -> getConfigParam ( 'iNewestArticlesMode' ) ) { case 0 : // switched off, do nothing break ; case 1 : // manually entered $ this -> loadActionArticles ( 'oxnewest' , $ iLimit ) ; break ; case 2 : $ sArticleTable = getViewName ( 'oxarticles' ) ; if ( $ myConfig -> getConfigParam ( 'blNewArtByInsert' ) ) { $ sType = 'oxinsert' ; } else { $ sType = 'oxtimestamp' ; } $ sSelect = "select * from $sArticleTable " ; $ sSelect .= "where oxparentid = '' and " . $ this -> getBaseObject ( ) -> getSqlActiveSnippet ( ) . " and oxissearch = 1 order by $sType desc " ; if ( ! ( $ iLimit = ( int ) $ iLimit ) ) { $ iLimit = $ myConfig -> getConfigParam ( 'iNrofNewcomerArticles' ) ; } $ sSelect .= "limit " . $ iLimit ; $ this -> selectString ( $ sSelect ) ; break ; } }
Loads newest shops articles from DB.

@param int $iLimit Select limit
Loads newest shops articles from DB .