source/Application/Component/Widget/ArticleDetails.php
public function getLastProducts($iCnt = 4)
    {
        if ($this->_aLastProducts === null) {
            //last seen products for #768CA
            $oProduct = $this->getProduct();
            $sParentIdField = 'oxarticles__oxparentid';
            $sArtId = $oProduct->$sParentIdField->value ? $oProduct->$sParentIdField->value : $oProduct->getId();

            $oHistoryArtList = oxNew(\OxidEsales\Eshop\Application\Model\ArticleList::class);
            $oHistoryArtList->loadHistoryArticles($sArtId, $iCnt);
            $this->_aLastProducts = $oHistoryArtList;
        }

        return $this->_aLastProducts;
    }
public function getLastProducts($iCnt = 4)
    {
        if ($this->_aLastProducts === null) {
            //last seen products for #768CA
            $oProduct = $this->getProduct();
            $sParentIdField = 'oxarticles__oxparentid';
            $sArtId = $oProduct->$sParentIdField->value ? $oProduct->$sParentIdField->value : $oProduct->getId();

            $oHistoryArtList = oxNew(\OxidEsales\Eshop\Application\Model\ArticleList::class);
            $oHistoryArtList->loadHistoryArticles($sArtId, $iCnt);
            $this->_aLastProducts = $oHistoryArtList;
        }

        return $this->_aLastProducts;
    }
public function getLastProducts ( $ iCnt = 4 ) { if ( $ this -> _aLastProducts === null ) { //last seen products for #768CA $ oProduct = $ this -> getProduct ( ) ; $ sParentIdField = 'oxarticles__oxparentid' ; $ sArtId = $ oProduct -> $ sParentIdField -> value ? $ oProduct -> $ sParentIdField -> value : $ oProduct -> getId ( ) ; $ oHistoryArtList = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ ArticleList :: class ) ; $ oHistoryArtList -> loadHistoryArticles ( $ sArtId , $ iCnt ) ; $ this -> _aLastProducts = $ oHistoryArtList ; } return $ this -> _aLastProducts ; }
Template variable getter. Returns last seen products.

@param int $iCnt product count

@return array
Template variable getter . Returns last seen products .