Returns shops basket link

@return string
169152
public function getBasketLink()
    {
        if (($sValue = $this->getViewConfigParam('basketlink')) === null) {
            $sValue = $this->getConfig()->getShopHomeUrl() . 'cl=basket';
            $this->setViewConfigParam('basketlink', $sValue);
        }

        return $sValue;
    }
636963
public function getBasketArticles()
    {
        $aBasketArticles = [];
        /** @var \oxBasketItem $oBasketItem */
        foreach ($this->_aBasketContents as $sItemKey => $oBasketItem) {
            try {
                $oProduct = $oBasketItem->getArticle(true);

                if (\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('bl_perfLoadSelectLists')) {
                    // marking chosen select list
                    $aSelList = $oBasketItem->getSelList();
                    if (is_array($aSelList) && ($aSelectlist = $oProduct->getSelectLists($sItemKey))) {
                        reset($aSelList);
                        foreach ($aSelList as $conkey => $iSel) {
                            $aSelectlist[$conkey][$iSel]->selected = 1;
                        }
                        $oProduct->setSelectlist($aSelectlist);
                    }
                }
            } catch (\OxidEsales\Eshop\Core\Exception\NoArticleException $oEx) {
                \OxidEsales\Eshop\Core\Registry::getUtilsView()->addErrorToDisplay($oEx);
                $this->removeItem($sItemKey);
                $this->calculateBasket(true);
                continue;
            } catch (\OxidEsales\Eshop\Core\Exception\ArticleInputException $oEx) {
                \OxidEsales\Eshop\Core\Registry::getUtilsView()->addErrorToDisplay($oEx);
                $this->removeItem($sItemKey);
                $this->calculateBasket(true);
                continue;
            }

            $aBasketArticles[$sItemKey] = $oProduct;
        }

        return $aBasketArticles;
    }
41944
public function getShopId()
    {
        if (is_null($this->_iShopId)) {
            $shopId = $this->calculateActiveShopId();
            $this->setShopId($shopId);

            if (!$this->_isValidShopId($shopId)) {
                $shopId = $this->getBaseShopId();
            }
            $this->setShopId($shopId);
        }

        return $this->_iShopId;
    }
210064
public function getMoreDetailLink()
    {
        if ($this->_sMoreDetailLink == null) {
            // and assign special article values
            $this->_sMoreDetailLink = \OxidEsales\Eshop\Core\Registry::getConfig()->getShopHomeUrl() . 'cl=moredetails';

            // not always it is okey, as not all the time active category is the same as primary article cat.
            if ($sActCat = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('cnid')) {
                $this->_sMoreDetailLink .= '&amp;cnid=' . $sActCat;
            }
            $this->_sMoreDetailLink .= '&amp;anid=' . $this->getId();
        }

        return $this->_sMoreDetailLink;
    }
1121023
public function getBasketItems()
    {
        $params = $this->getRequest()->getParams();

        if (! isset($params['quote_id']) ||
            ! isset($params['code']) ||
            ! $this->helper->isCodeValid($params['code'])
        ) {
            $this->helper->log('Abandoned cart not found or invalid code');

            return false;
        }
        $quoteId = (int) $params['quote_id'];
        $quoteModel = $this->quoteFactory->create()
            ->loadByIdWithoutStore($quoteId);

        //check for any quote for this email, don't want to render further
        if (!$quoteModel->getId()) {
            $this->helper->log('no quote found for ' . $quoteId);

            return false;
        }
        if (!$quoteModel->getIsActive()) {
            $this->helper->log('Cart is not active : ' . $quoteId);

            return false;
        }

        $this->quote = $quoteModel;

        //Start environment emulation of the specified store
        $storeId = $quoteModel->getStoreId();

        $appEmulation = $this->emulationFactory->create();
        $appEmulation->startEnvironmentEmulation($storeId);

        $quoteItems = $quoteModel->getAllItems();

        $itemsData = [];

        /** @var \Magento\Quote\Model\Quote\Item $quoteItem */

        $parentProductIds = [];

        //Collect all parent ids to identify later which products to show in EDC
        foreach ($quoteItems as $quoteItem) {
            if ($quoteItem->getParentItemId() == null) {
                $parentProductIds[] = $quoteItem->getProduct()->getId();
            }
        }
        foreach ($quoteItems as $quoteItem) {
            if ($quoteItem->getParentItemId() != null) {
                //If a product is a bundle we don't need to show all parts of it.
                if ($quoteItem->getParentItem()->getProductType() == 'bundle') {
                    continue;
                }
                $itemsData[] =  $this->getItemDataForChildProducts($quoteItem);
                //Signal that we added a child product, so its parent must be ignored later.
                if (in_array($quoteItem->getParentItem()->getProduct()->getId(), $parentProductIds)) {
                    $key = array_search($quoteItem->getParentItem()->getProduct()->getId(), $parentProductIds);
                    unset($parentProductIds[$key]);
                }
            }
        }

        foreach ($quoteItems as $quoteItem) {
            //If a child product added already, we must not add it's parent.
            if ($quoteItem->getParentItemId() == null && in_array($quoteItem->getProduct()->getId(), $parentProductIds)) {
                $itemsData[] = $this->getItemDataForParentProducts($quoteItem);
            }
        }

        return $itemsData;
    }
402306
protected function getListCart()
    {
        $id = $this->getParam(0);

        if (!isset($id)) {
            return $this->cart->getList(array('limit' => $this->getLimit()));
        }

        if ($this->getParam('user')) {
            return $this->cart->getList(array('user_id' => $id, 'limit' => $this->getLimit()));
        }

        if ($this->getParam('sku')) {
            return $this->cart->getList(array('sku' => $id, 'limit' => $this->getLimit()));
        }

        if (!is_numeric($id)) {
            $this->errorAndExit($this->text('Invalid argument'));
        }

        if ($this->getParam('order')) {
            return $this->cart->getList(array('order_id' => $id, 'limit' => $this->getLimit()));
        }

        if ($this->getParam('store')) {
            return $this->cart->getList(array('store_id' => $id, 'limit' => $this->getLimit()));
        }

        $result = $this->cart->get($id);

        if (empty($result)) {
            $this->errorAndExit($this->text('Unexpected result'));
        }

        return array($result);
    }
997195
public function getExeOrderLink()
    {
        if (($sValue = $this->getViewConfigParam('exeorderlink')) === null) {
            $sValue = $this->getConfig()->getShopSecureHomeUrl() . 'cl=order&amp;fnc=execute';
            $this->setViewConfigParam('exeorderlink', $sValue);
        }

        return $sValue;
    }
951096
public function getBreadCrumb()
    {
        $aPaths = [];
        $aPath = [];

        $oLang = \OxidEsales\Eshop\Core\Registry::getLang();
        $iBaseLanguage = $oLang->getBaseLanguage();
        $sTranslatedString = $oLang->translateString('LATEST_NEWS_AND_UPDATES_AT', $iBaseLanguage, false);

        $aPath['title'] = $sTranslatedString . ' ' . \OxidEsales\Eshop\Core\Registry::getConfig()->getActiveShop()->oxshops__oxname->value;
        $aPath['link'] = $this->getLink();

        $aPaths[] = $aPath;

        return $aPaths;
    }
1087870
public function getItemUrlAttribute()
    {
        if( $this->type == 'link' ) {
            return $this->url;
        }

        if( $this->type == 'page' && ! is_null($this->page) )
            return $this->page->page_url;

        return '';
    }
634075
public function getActiveShop()
    {
        if ($this->_oActShop && $this->_iShopId == $this->_oActShop->getId() &&
            $this->_oActShop->getLanguage() == Registry::getLang()->getBaseLanguage()
        ) {
            return $this->_oActShop;
        }

        $this->_oActShop = oxNew(\OxidEsales\Eshop\Application\Model\Shop::class);
        $this->_oActShop->load($this->getShopId());

        return $this->_oActShop;
    }
344513
public function getGateway()
    {
        if (null === $this->_gateway) {
            $this->_gateway = Commerce::getInstance()->getGateways()->getGatewayById($this->gatewayId);
        }

        return $this->_gateway;
    }
1324699
protected function GetTopsellers()
    {
        $oLocal = &TCMSLocal::GetActive();
        $query = 'SELECT SUM(`shop_order_item`.`order_amount`) AS totalordered,
                       SUM(`shop_order_item`.`order_price_after_discounts`) AS totalorderedvalue,
                       `shop_category`.`url_path` AS categorypath, `shop_order_item`.*
                  FROM `shop_order_item`
             LEFT JOIN `shop_order` ON `shop_order_item`.`shop_order_id` = `shop_order`.`id`
             LEFT JOIN `shop_article_shop_category_mlt` ON `shop_order_item`.`shop_article_id` = `shop_article_shop_category_mlt`.`source_id`
             LEFT JOIN `shop_category` ON `shop_article_shop_category_mlt`.`target_id` = `shop_category`.`id`

               ';
        $aBaseCondition = array();
        if (!is_null($this->sStartDate)) {
            $aBaseCondition[] = "`shop_order`.`datecreated` >= '".\MySqlLegacySupport::getInstance()->real_escape_string($oLocal->StringToDate($this->sStartDate))."'";
        }
        if (!is_null($this->sEndDate)) {
            $aBaseCondition[] = "`shop_order`.`datecreated` <= '".\MySqlLegacySupport::getInstance()->real_escape_string($oLocal->StringToDate($this->sEndDate))." 23:59:59'";
        }
        if ('' != $this->selectedPortalId) {
            $aBaseCondition[] = "`shop_order`.`cms_portal_id` = '".\MySqlLegacySupport::getInstance()->real_escape_string($this->selectedPortalId)."'";
        }

        $query .= ' WHERE ('.implode(') AND (', $aBaseCondition).')';

        $query .= ' GROUP BY `shop_category`.`id`, `shop_order_item`.`shop_article_id`';
        $query .= ' ORDER BY totalordered DESC ';
        $query .= ' LIMIT 0,50';

        $oOrderItems = TdbShopOrderItemList::GetList($query);

        return $oOrderItems;
    }
575113
public function GetRemoveFromBasketLink()
    {
        $activeShop = $this->getShopService()->getActiveShop();
        $aParameters = array('module_fnc['.$activeShop->GetBasketModuleSpotName().']' => 'RemoveFromBasketViaBasketItemKey', MTShopBasketCore::URL_ITEM_BASKET_KEY => $this->sBasketItemKey, MTShopBasketCore::URL_MESSAGE_CONSUMER => MTShopBasketCore::MSG_CONSUMER_NAME);

        return $this->getActivePageService()->getLinkToActivePageRelative($aParameters);
    }
424929
private function listBaskets()
    {
        /** @var BasketRepository $repo */
        $repo = $this->app['repo.baskets'];

        return array_map(function (Basket $basket) {
            return $this->listBasket($basket);
        }, $repo->findActiveByUser($this->getAuthenticatedUser()));
    }
645471
public function getSslSelfLink()
    {
        if ($this->isAdmin()) {
            // using getSelfLink() method in admin mode (#2745)
            return $this->getSelfLink();
        }

        if (($sValue = $this->getViewConfigParam('sslselflink')) === null) {
            $sValue = $this->getConfig()->getShopSecureHomeURL();
            $this->setViewConfigParam('sslselflink', $sValue);
        }

        return $sValue;
    }
1272277
public function GetTranslatedPageURL()
    {
        $sTranslatesPageURL = '';
        $this->TargetLanguageSimulation(true);

        // product page
        $oActiveProduct = TdbShop::GetActiveItem();
        if (is_object($oActiveProduct)) {
            $oNewProduct = TdbShopArticle::GetNewInstance($oActiveProduct->id, $this->id);
            $oActiveProductCategory = TdbShop::GetActiveCategory();

            $sCatId = null;
            if (is_object($oActiveProductCategory)) {
                $sCatId = $oActiveProductCategory->id;
            }
            $sTranslatesPageURL = $oNewProduct->GetDetailLink(true, $sCatId);
        }

        // category page?
        if (empty($sTranslatesPageURL)) {
            $oActiveProductCategory = TdbShop::GetActiveCategory();
            if (is_object($oActiveProductCategory)) {
                $oNewProductCategory = TdbShopCategory::GetNewInstance($oActiveProductCategory->id, $this->id);
                $sTranslatesPageURL = $oNewProductCategory->GetLink(true);
            }
        }

        $this->TargetLanguageSimulation(false);

        // shop basket wizard?
        if (empty($sTranslatesPageURL)) {
            $oGlobal = TGlobal::instance();
            $sStepName = $oGlobal->GetUserData(MTShopOrderWizardCore::URL_PARAM_STEP_SYSTEM_NAME);
            if (!empty($sStepName)) {
                $oActiveStep = TdbShopOrderStep::GetStep($sStepName);
                $sTranslatesPageURL = $this->getOrderStepPageService()->getLinkToOrderStepPageAbsolute($oActiveStep, array(), null, $this);
            }
        }

        if (empty($sTranslatesPageURL)) {
            $sTranslatesPageURL = parent::GetTranslatedPageURL();
        }

        return $sTranslatesPageURL;
    }
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()
        );
    }