Return the current articles from the basket

@return object | bool
177647
public function getBasketArticles()
    {
        if ($this->_oBasketArticles === null) {
            $this->_oBasketArticles = false;

            // passing basket articles
            if ($oBasket = $this->getSession()->getBasket()) {
                $this->_oBasketArticles = $oBasket->getBasketArticles();
            }
        }

        return $this->_oBasketArticles;
    }
959838
private function getCurrentRequestContent()
    {
        $currentRequest = $this->requestStack->getCurrentRequest();
        if (!is_null($currentRequest)) {
            $this->currentRequestContent = json_decode($currentRequest->getContent());
        }
        return $this->currentRequestContent;
    }
571857
public function getArticleList()
    {
        if ($this->_aArticleList === null) {
            $this->_aArticleList = false;
            if ($oActiveRecommList = $this->getActiveRecommList()) {
                // sets active page
                $iActPage = (int) \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('pgNr');
                $iActPage = ($iActPage < 0) ? 0 : $iActPage;

                // load only lists which we show on screen
                $iNrofCatArticles = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('iNrofCatArticles');
                $iNrofCatArticles = $iNrofCatArticles ? $iNrofCatArticles : 10;

                $this->_aArticleList = $oActiveRecommList->getArticles(
                    $iNrofCatArticles * $iActPage,
                    $iNrofCatArticles
                );

                if ($this->_aArticleList && $this->_aArticleList->count()) {
                    foreach ($this->_aArticleList as $oItem) {
                        $oItem->text = $oActiveRecommList->getArtDescription($oItem->getId());
                    }
                }
            }
        }

        return $this->_aArticleList;
    }
66240
public function GetVat()
    {
        $oVat = $this->GetFromInternalCache('ovat');
        if (is_null($oVat)) {
            $oVat = $this->getOwnVat();
            if (is_null($oVat)) {
                // try to fetch from article group
                $oArticleGroups = $this->GetArticleGroups();
                $oVat = $oArticleGroups->GetMaxVat();
            }

            if (is_null($oVat)) {
                // try to fetch from category
                $oCategories = $this->GetFieldShopCategoryList();
                $oVat = $oCategories->GetMaxVat();
            }

            if (is_null($oVat)) {
                // try to fetch from shop
                $oShopConfig = TdbShop::GetInstance();
                $oVat = $oShopConfig->GetVat();
            }
            $this->SetInternalCache('ovat', $oVat);
        }

        return $oVat;
    }
905893
public function getArticleList()
    {
        if ($this->_aArticleList === null) {
            $this->_aArticleList = [];
            if (($oManufacturerTree = $this->getManufacturerTree())) {
                $oManufacturer = $this->getActManufacturer();
                if ($oManufacturer && ($oManufacturer->getId() != 'root') && $oManufacturer->getIsVisible()) {
                    list($aArticleList, $iAllArtCnt) = $this->_loadArticles($oManufacturer);
                    if ($iAllArtCnt) {
                        $this->_aArticleList = $aArticleList;
                    }
                }
            }
        }

        return $this->_aArticleList;
    }
921729
public function getBasketProducts()
    {
        return array_map(
            function($item) {
                $item['params'] = Json::decode($item['params']);
                return $item;
            },
            $this->find()
            ->where([
                'id_user' => $this->idUser,
                'storage' => $this->owner->storageName
            ])
            ->asArray()
            ->all()
        );
    }
1037464
public function getArticles()
    {
        if (is_null($this->_aArtIds)) {
            $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
            $sQ = "select oxobjectid from oxobject2delivery where oxdeliveryid=" . $oDb->quote($this->getId()) . " and oxtype = 'oxarticles'";
            $aArtIds = $oDb->getCol($sQ);
            $this->_aArtIds = $aArtIds;
        }

        return $this->_aArtIds;
    }
160288
public function getBasketReservations()
    {
        if (!$this->_oBasketReservations) {
            $this->_oBasketReservations = oxNew(\OxidEsales\Eshop\Application\Model\BasketReservation::class);
        }

        return $this->_oBasketReservations;
    }
480875
public function getBasket()
    {
        if ($this->_oBasket === null) {
            $this->_oBasket = false;
            if ($oBasket = $this->getSession()->getBasket()) {
                $this->_oBasket = $oBasket;
            }
        }

        return $this->_oBasket;
    }
444031
public function getArticleList()
    {
        if ($this->_oActRecommListArticles === null) {
            $this->_oActRecommListArticles = false;

            if (($oRecommList = $this->getActiveRecommList())) {
                $oItemList = $oRecommList->getArticles();

                if ($oItemList->count()) {
                    foreach ($oItemList as $key => $oItem) {
                        if (!$oItem->isVisible()) {
                            $oRecommList->removeArticle($oItem->getId());
                            $oItemList->offsetUnset($key);
                            continue;
                        }

                        $oItem->text = $oRecommList->getArtDescription($oItem->getId());
                    }
                    $this->_oActRecommListArticles = $oItemList;
                }
            }
        }

        return $this->_oActRecommListArticles;
    }
1299790
protected function CheckBasketContents()
    {
        if ('basket' !== $this->fieldSystemname) {
            $oBasket = $this->getShopService()->getActiveBasket();
            if ($oBasket->dTotalNumberOfArticles <= 0) {
                $oBasketStep = TdbShopOrderStep::GetStep('basket');
                $this->JumpToStep($oBasketStep);
            }
        }
    }
1281263
protected function getItems()
    {
        $list = $this->DataSource->getItems($this->pagesize * ($this->currentpage - 1), $this->getPageSize(), $this->sortf, $this->sortd);
        $this->pagerowscount = count($list);
        return is_array($list) ? $list : array();
    }
1081456
public function getBasketSummary()
    {
        if ($this->_blUpdateNeeded || $this->_aBasketSummary === null) {
            $this->_aBasketSummary = new stdclass();
            $this->_aBasketSummary->aArticles = [];
            $this->_aBasketSummary->aCategories = [];
            $this->_aBasketSummary->iArticleCount = 0;
            $this->_aBasketSummary->dArticlePrice = 0;
            $this->_aBasketSummary->dArticleDiscountablePrice = 0;
        }

        if (!$this->isEnabled()) {
            return $this->_aBasketSummary;
        }

        $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
        /** @var \OxidEsales\EshopCommunity\Application\Model\BasketItem $oBasketItem */
        foreach ($this->_aBasketContents as $oBasketItem) {
            if (!$oBasketItem->isBundle() && $oArticle = $oBasketItem->getArticle(false)) {
                $aCatIds = $oArticle->getCategoryIds();
                //#M530 if price is not loaded for articles
                $dPrice = 0;
                $dDiscountablePrice = 0;
                if (($oPrice = $oArticle->getBasketPrice($oBasketItem->getAmount(), $oBasketItem->getSelList(), $this))) {
                    $dPrice = $oPrice->getPrice();
                    if (!$oArticle->skipDiscounts()) {
                        $dDiscountablePrice = $dPrice;
                    }
                }

                foreach ($aCatIds as $sCatId) {
                    if (!isset($this->_aBasketSummary->aCategories[$sCatId])) {
                        $priceObject = new stdClass();
                        $priceObject->dPrice = 0;
                        $priceObject->dDiscountablePrice = 0;
                        $priceObject->dAmount = 0;
                        $priceObject->iCount = 0;
                        $this->_aBasketSummary->aCategories[$sCatId] = $priceObject;
                    }

                    $categorySummaryPrice = $this->_aBasketSummary->aCategories[$sCatId];
                    $categorySummaryPrice->dPrice += $dPrice * $oBasketItem->getAmount();
                    $categorySummaryPrice->dDiscountablePrice += $dDiscountablePrice * $oBasketItem->getAmount();
                    $categorySummaryPrice->dAmount += $oBasketItem->getAmount();
                    $categorySummaryPrice->iCount++;
                }

                // variant handling
                if (($sParentId = $oArticle->getParentId()) && $myConfig->getConfigParam('blVariantParentBuyable')) {
                    if (!isset($this->_aBasketSummary->aArticles[$sParentId])) {
                        $this->_aBasketSummary->aArticles[$sParentId] = 0;
                    }
                    $this->_aBasketSummary->aArticles[$sParentId] += $oBasketItem->getAmount();
                }

                if (!isset($this->_aBasketSummary->aArticles[$oBasketItem->getProductId()])) {
                    $this->_aBasketSummary->aArticles[$oBasketItem->getProductId()] = 0;
                }

                $this->_aBasketSummary->aArticles[$oBasketItem->getProductId()] += $oBasketItem->getAmount();
                $this->_aBasketSummary->iArticleCount += $oBasketItem->getAmount();
                $this->_aBasketSummary->dArticlePrice += $dPrice * $oBasketItem->getAmount();
                $this->_aBasketSummary->dArticleDiscountablePrice += $dDiscountablePrice * $oBasketItem->getAmount();
            }
        }

        return $this->_aBasketSummary;
    }
897988
public function getProduct()
    {
        if ($this->_oArticle === null) {
            $this->_oArticle = false;
            $aParams = $this->_getParams();
            $oArticle = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);
            $oArticle->load($aParams['aid']);
            $this->_oArticle = $oArticle;
        }

        return $this->_oArticle;
    }
1344459
public function getCurrentPageInfo()
    {
        $result = array(
            'handle' => $this->getCurrentPage()
        );
        
        if (Mage::registry('current_category') instanceof Mage_Catalog_Model_Category) {
            $result['category'] = Mage::registry('current_category')->getId();
        }

        if (Mage::registry('current_product') instanceof Mage_Catalog_Model_Product) {
            $result['product'] = Mage::registry('current_product')->getId();
        }
        
        return $result;
    }
838896
public function get()
	{
		if( !isset( $this->baskets[$this->type] ) )
		{
			$this->baskets[$this->type] = $this->manager->getSession( $this->type );
			$this->checkLocale( $this->baskets[$this->type]->getLocale(), $this->type );
		}

		return $this->baskets[$this->type];
	}
1099674
public function loadRelatedArticles()
    {
        $this->v["articles"] = $artCondIDs = [];
        $this->v["allUrls"] = [ "txt" => [], "vid" => [] ];
        $allArticles = SLConditionsArticles::get();
        if ($allArticles->isNotEmpty()) {
            foreach ($allArticles as $i => $a) {
                $artCondIDs[] = $a->ArticleCondID;
            }
            $allConds = SLConditions::whereIn('CondID', $artCondIDs)->get();
            if ($allConds->isNotEmpty()) {
                foreach ($allConds as $i => $c) {
                    if ($this->parseConditions([$c])) {
                        $artLnks = [];
                        foreach ($allArticles as $i => $a) {
                            if ($a->ArticleCondID == $c->CondID) {
                                $artLnks[] = [$a->ArticleTitle, $a->ArticleURL];
                                $set = ((strpos(strtolower($a->ArticleURL), 'youtube.com') !== false) ? 'vid' : 'txt');
                                $found = false;
                                if (sizeof($this->v["allUrls"][$set]) > 0) {
                                    foreach ($this->v["allUrls"][$set] as $url) {
                                        if ($url[1] == $a->ArticleURL) {
                                            $found = true;
                                        }
                                    }
                                }
                                if (!$found) {
                                    $this->v["allUrls"][$set][] = [$a->ArticleTitle, $a->ArticleURL];
                                }
                            }
                        }
                        $this->v["articles"][] = [$c, $artLnks];
                    }
                }
            }
            return true;
        }
        return false;
    }