src/ShopBundle/objects/WebModules/MTShopBasketCore/MTShopBasketCoreEndpoint.class.php
public function JumpToBasketPage()
    {
        $bJumpAsFarAsPossible = false;
        if ('1' === $this->getInputFilterUtil()->getFilteredInput('bJumpAsFarAsPossible')) {
            $bJumpAsFarAsPossible = true;
        }

        // save calling url to session
        $sCallingURL = $this->getCallingUrl();

        MTShopOrderWizardCore::SetCallingURL($sCallingURL);

        $systemPageService = $this->getSystemPageService();
        $checkoutSystemPage = $systemPageService->getSystemPage('checkout');
        if (null === $checkoutSystemPage) {
            throw new RouteNotFoundException("No system page with system name 'checkout' found - unable to redirect to the basket.");
        }
        $iRequestRedirectNodeId = $checkoutSystemPage->fieldCmsTreeId;

        $bNeedToRedirect = true;
        if (false === $bJumpAsFarAsPossible && $this->getActivePageService()->getActivePage()->GetMainTreeId() == $iRequestRedirectNodeId) {
            // we are already on the
            $bNeedToRedirect = false;
        }
        if (true === $bNeedToRedirect) {
            $oNode = new TCMSTreeNode();
            /** @var $oNode TCMSTreeNode */
            if ($oNode->Load($iRequestRedirectNodeId)) {
                $sURL = null;
                if ($bJumpAsFarAsPossible) {
                    $oUser = $this->getExtranetUserProvider()->getActiveUser();
                    $oStep = null;
                    $oBillingAdr = $oUser->GetBillingAddress();
                    if ($oUser->IsLoggedIn() && !is_null($oBillingAdr) && $oBillingAdr->ValidateData(TdbDataExtranetUserAddress::FORM_DATA_NAME_BILLING)) {
                        $oStep = TdbShopOrderStep::GetStep('shipping');
                    } else {
                        $oStep = TdbShopOrderStep::GetStep('user');
                    }
                    if (!is_null($oStep)) {
                        $sURL = $oStep->GetStepURL();
                    }
                }
                if (null === $sURL) {
                    $sURL = $systemPageService->getLinkToSystemPageRelative('checkout');
                }
                $this->getRedirect()->redirect($sURL);
            } else {
                $this->RedirectToCallingPage();
            }
        }
    }
public function JumpToBasketPage()
    {
        $bJumpAsFarAsPossible = false;
        if ('1' === $this->getInputFilterUtil()->getFilteredInput('bJumpAsFarAsPossible')) {
            $bJumpAsFarAsPossible = true;
        }

        // save calling url to session
        $sCallingURL = $this->getCallingUrl();

        MTShopOrderWizardCore::SetCallingURL($sCallingURL);

        $systemPageService = $this->getSystemPageService();
        $checkoutSystemPage = $systemPageService->getSystemPage('checkout');
        if (null === $checkoutSystemPage) {
            throw new RouteNotFoundException("No system page with system name 'checkout' found - unable to redirect to the basket.");
        }
        $iRequestRedirectNodeId = $checkoutSystemPage->fieldCmsTreeId;

        $bNeedToRedirect = true;
        if (false === $bJumpAsFarAsPossible && $this->getActivePageService()->getActivePage()->GetMainTreeId() == $iRequestRedirectNodeId) {
            // we are already on the
            $bNeedToRedirect = false;
        }
        if (true === $bNeedToRedirect) {
            $oNode = new TCMSTreeNode();
            /** @var $oNode TCMSTreeNode */
            if ($oNode->Load($iRequestRedirectNodeId)) {
                $sURL = null;
                if ($bJumpAsFarAsPossible) {
                    $oUser = $this->getExtranetUserProvider()->getActiveUser();
                    $oStep = null;
                    $oBillingAdr = $oUser->GetBillingAddress();
                    if ($oUser->IsLoggedIn() && !is_null($oBillingAdr) && $oBillingAdr->ValidateData(TdbDataExtranetUserAddress::FORM_DATA_NAME_BILLING)) {
                        $oStep = TdbShopOrderStep::GetStep('shipping');
                    } else {
                        $oStep = TdbShopOrderStep::GetStep('user');
                    }
                    if (!is_null($oStep)) {
                        $sURL = $oStep->GetStepURL();
                    }
                }
                if (null === $sURL) {
                    $sURL = $systemPageService->getLinkToSystemPageRelative('checkout');
                }
                $this->getRedirect()->redirect($sURL);
            } else {
                $this->RedirectToCallingPage();
            }
        }
    }
public function JumpToBasketPage ( ) { $ bJumpAsFarAsPossible = false ; if ( '1' === $ this -> getInputFilterUtil ( ) -> getFilteredInput ( 'bJumpAsFarAsPossible' ) ) { $ bJumpAsFarAsPossible = true ; } // save calling url to session $ sCallingURL = $ this -> getCallingUrl ( ) ; MTShopOrderWizardCore :: SetCallingURL ( $ sCallingURL ) ; $ systemPageService = $ this -> getSystemPageService ( ) ; $ checkoutSystemPage = $ systemPageService -> getSystemPage ( 'checkout' ) ; if ( null === $ checkoutSystemPage ) { throw new RouteNotFoundException ( "No system page with system name 'checkout' found - unable to redirect to the basket." ) ; } $ iRequestRedirectNodeId = $ checkoutSystemPage -> fieldCmsTreeId ; $ bNeedToRedirect = true ; if ( false === $ bJumpAsFarAsPossible && $ this -> getActivePageService ( ) -> getActivePage ( ) -> GetMainTreeId ( ) == $ iRequestRedirectNodeId ) { // we are already on the $ bNeedToRedirect = false ; } if ( true === $ bNeedToRedirect ) { $ oNode = new TCMSTreeNode ( ) ; /** @var $oNode TCMSTreeNode */ if ( $ oNode -> Load ( $ iRequestRedirectNodeId ) ) { $ sURL = null ; if ( $ bJumpAsFarAsPossible ) { $ oUser = $ this -> getExtranetUserProvider ( ) -> getActiveUser ( ) ; $ oStep = null ; $ oBillingAdr = $ oUser -> GetBillingAddress ( ) ; if ( $ oUser -> IsLoggedIn ( ) && ! is_null ( $ oBillingAdr ) && $ oBillingAdr -> ValidateData ( TdbDataExtranetUserAddress :: FORM_DATA_NAME_BILLING ) ) { $ oStep = TdbShopOrderStep :: GetStep ( 'shipping' ) ; } else { $ oStep = TdbShopOrderStep :: GetStep ( 'user' ) ; } if ( ! is_null ( $ oStep ) ) { $ sURL = $ oStep -> GetStepURL ( ) ; } } if ( null === $ sURL ) { $ sURL = $ systemPageService -> getLinkToSystemPageRelative ( 'checkout' ) ; } $ this -> getRedirect ( ) -> redirect ( $ sURL ) ; } else { $ this -> RedirectToCallingPage ( ) ; } } }
call the method to jump to the basket detail page. it will store the calling URL in the session, so
that it becomes possible to jump back to this page from the basket.

@throws RouteNotFoundException
call the method to jump to the basket detail page . it will store the calling URL in the session so that it becomes possible to jump back to this page from the basket .