source/Application/Model/UserBasket.php
public function getItems($blReload = false, $blActiveCheck = true)
    {
        // cached ?
        if ($this->_aBasketItems !== null && !$blReload) {
            return $this->_aBasketItems;
        }

        // initializing
        $this->_aBasketItems = [];

        // loading basket items
        $oArticle = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);
        $sViewName = $oArticle->getViewName();

        $sSelect = "select oxuserbasketitems.* from oxuserbasketitems left join $sViewName on oxuserbasketitems.oxartid = $sViewName.oxid ";
        if ($blActiveCheck) {
            $sSelect .= 'and ' . $oArticle->getSqlActiveSnippet() . ' ';
        }
        $sSelect .= "where oxuserbasketitems.oxbasketid = '" . $this->getId() . "' and $sViewName.oxid is not null ";

        $sSelect .= " order by oxartnum, oxsellist, oxpersparam ";

        $oItems = oxNew(\OxidEsales\Eshop\Core\Model\ListModel::class);
        $oItems->init('oxuserbasketitem');
        $oItems->selectstring($sSelect);

        foreach ($oItems as $oItem) {
            $sKey = $this->_getItemKey($oItem->oxuserbasketitems__oxartid->value, $oItem->getSelList(), $oItem->getPersParams());
            $this->_aBasketItems[$sKey] = $oItem;
        }

        return $this->_aBasketItems;
    }
public function getItems($blReload = false, $blActiveCheck = true)
    {
        // cached ?
        if ($this->_aBasketItems !== null && !$blReload) {
            return $this->_aBasketItems;
        }

        // initializing
        $this->_aBasketItems = [];

        // loading basket items
        $oArticle = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);
        $sViewName = $oArticle->getViewName();

        $sSelect = "select oxuserbasketitems.* from oxuserbasketitems left join $sViewName on oxuserbasketitems.oxartid = $sViewName.oxid ";
        if ($blActiveCheck) {
            $sSelect .= 'and ' . $oArticle->getSqlActiveSnippet() . ' ';
        }
        $sSelect .= "where oxuserbasketitems.oxbasketid = '" . $this->getId() . "' and $sViewName.oxid is not null ";

        $sSelect .= " order by oxartnum, oxsellist, oxpersparam ";

        $oItems = oxNew(\OxidEsales\Eshop\Core\Model\ListModel::class);
        $oItems->init('oxuserbasketitem');
        $oItems->selectstring($sSelect);

        foreach ($oItems as $oItem) {
            $sKey = $this->_getItemKey($oItem->oxuserbasketitems__oxartid->value, $oItem->getSelList(), $oItem->getPersParams());
            $this->_aBasketItems[$sKey] = $oItem;
        }

        return $this->_aBasketItems;
    }
public function getItems ( $ blReload = false , $ blActiveCheck = true ) { // cached ? if ( $ this -> _aBasketItems !== null && ! $ blReload ) { return $ this -> _aBasketItems ; } // initializing $ this -> _aBasketItems = [ ] ; // loading basket items $ oArticle = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ Article :: class ) ; $ sViewName = $ oArticle -> getViewName ( ) ; $ sSelect = "select oxuserbasketitems.* from oxuserbasketitems left join $sViewName on oxuserbasketitems.oxartid = $sViewName.oxid " ; if ( $ blActiveCheck ) { $ sSelect .= 'and ' . $ oArticle -> getSqlActiveSnippet ( ) . ' ' ; } $ sSelect .= "where oxuserbasketitems.oxbasketid = '" . $ this -> getId ( ) . "' and $sViewName.oxid is not null " ; $ sSelect .= " order by oxartnum, oxsellist, oxpersparam " ; $ oItems = oxNew ( \ OxidEsales \ Eshop \ Core \ Model \ ListModel :: class ) ; $ oItems -> init ( 'oxuserbasketitem' ) ; $ oItems -> selectstring ( $ sSelect ) ; foreach ( $ oItems as $ oItem ) { $ sKey = $ this -> _getItemKey ( $ oItem -> oxuserbasketitems__oxartid -> value , $ oItem -> getSelList ( ) , $ oItem -> getPersParams ( ) ) ; $ this -> _aBasketItems [ $ sKey ] = $ oItem ; } return $ this -> _aBasketItems ; }
Returns list of basket items

@param bool $blReload      if TRUE forces to reload list
@param bool $blActiveCheck should articles be checked for active state?

@return array of oxUserBasketItems
Returns list of basket items