source/Application/Model/Article.php
public function getToBasketLink()
    {
        if ($this->_sToBasketLink == null) {
            $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();

            if (\OxidEsales\Eshop\Core\Registry::getUtils()->isSearchEngine()) {
                $this->_sToBasketLink = $this->getLink();
            } else {
                // and assign special article values
                $this->_sToBasketLink = $myConfig->getShopHomeUrl();

                // override some classes as these should never showup
                $actControllerId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestControllerId();
                if ($actControllerId == 'thankyou') {
                    $actControllerId = 'basket';
                }
                $this->_sToBasketLink .= 'cl=' . $actControllerId;

                // this is not very correct
                if ($sActCat = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('cnid')) {
                    $this->_sToBasketLink .= '&amp;cnid=' . $sActCat;
                }

                $this->_sToBasketLink .= '&amp;fnc=tobasket&amp;aid=' . $this->getId() . '&amp;anid=' . $this->getId();

                if ($sTpl = basename(\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('tpl'))) {
                    $this->_sToBasketLink .= '&amp;tpl=' . $sTpl;
                }
            }
        }

        return $this->_sToBasketLink;
    }
public function getToBasketLink()
    {
        if ($this->_sToBasketLink == null) {
            $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();

            if (\OxidEsales\Eshop\Core\Registry::getUtils()->isSearchEngine()) {
                $this->_sToBasketLink = $this->getLink();
            } else {
                // and assign special article values
                $this->_sToBasketLink = $myConfig->getShopHomeUrl();

                // override some classes as these should never showup
                $actControllerId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestControllerId();
                if ($actControllerId == 'thankyou') {
                    $actControllerId = 'basket';
                }
                $this->_sToBasketLink .= 'cl=' . $actControllerId;

                // this is not very correct
                if ($sActCat = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('cnid')) {
                    $this->_sToBasketLink .= '&amp;cnid=' . $sActCat;
                }

                $this->_sToBasketLink .= '&amp;fnc=tobasket&amp;aid=' . $this->getId() . '&amp;anid=' . $this->getId();

                if ($sTpl = basename(\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('tpl'))) {
                    $this->_sToBasketLink .= '&amp;tpl=' . $sTpl;
                }
            }
        }

        return $this->_sToBasketLink;
    }
public function getToBasketLink ( ) { if ( $ this -> _sToBasketLink == null ) { $ myConfig = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) ; if ( \ OxidEsales \ Eshop \ Core \ Registry :: getUtils ( ) -> isSearchEngine ( ) ) { $ this -> _sToBasketLink = $ this -> getLink ( ) ; } else { // and assign special article values $ this -> _sToBasketLink = $ myConfig -> getShopHomeUrl ( ) ; // override some classes as these should never showup $ actControllerId = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestControllerId ( ) ; if ( $ actControllerId == 'thankyou' ) { $ actControllerId = 'basket' ; } $ this -> _sToBasketLink .= 'cl=' . $ actControllerId ; // this is not very correct if ( $ sActCat = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( 'cnid' ) ) { $ this -> _sToBasketLink .= '&amp;cnid=' . $ sActCat ; } $ this -> _sToBasketLink .= '&amp;fnc=tobasket&amp;aid=' . $ this -> getId ( ) . '&amp;anid=' . $ this -> getId ( ) ; if ( $ sTpl = basename ( \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( 'tpl' ) ) ) { $ this -> _sToBasketLink .= '&amp;tpl=' . $ sTpl ; } } } return $ this -> _sToBasketLink ; }
Get to basket link

@return string
Get to basket link