Redirects user back to previous part of shop (list, details, ...) from basket.
Used with option "Display Message when Product is added to Cart" set to "Open Basket"
($myConfig->iNewBasketItemMessage == 3)

@return string   $sBackLink  back link
434184
public function backToShop()
    {
        if (\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('iNewBasketItemMessage') == 3) {
            $oSession = \OxidEsales\Eshop\Core\Registry::getSession();
            if ($sBackLink = $oSession->getVariable('_backtoshop')) {
                $oSession->deleteVariable('_backtoshop');

                return $sBackLink;
            }
        }
    }
924594
public function GetRemoveFromBasketLink($sMessageHandler = null)
    {
        if (is_null($sMessageHandler)) {
            $sMessageHandler = MTShopBasketCore::MSG_CONSUMER_NAME;
        }
        $oShopConfig = $this->getShopService()->getActiveShop();

        return $this->getActivePageService()->getLinkToActivePageRelative(array(
            'module_fnc' => array(
                $oShopConfig->GetBasketModuleSpotName() => 'RemoveVoucher',
            ),
            MTShopBasketCore::URL_REQUEST_PARAMETER => array(
                MTShopBasketCore::URL_MESSAGE_CONSUMER_NAME => $sMessageHandler,
                MTShopBasketCore::URL_VOUCHER_BASKET_KEY => $this->sBasketVoucherKey,
            ),
        ));
    }
232486
public static function RedirectBack()
    {
        $pagename = self::$app->getPageManager()->getPrevPage();
        $pagename = '\\' . rtrim($pagename, '\\');

        if ($pagename == "\\") {
            self::$app->response->toIndexPage();
            return;
        }
        self::$app->response->Redirect($pagename, array());
    }
145041
public function getRedirectMap()
    {
        if ($this->_redirectMap === null) {
            $this->_redirectMap = (new DbQuery())->select(['id', 'type', 'value', 'target'])->from('cms_nav_item_redirect')->indexBy('id')->all();
        }

        return $this->_redirectMap;
    }
694005
public function restoreQuickCheckoutBasket()
    {
        $oSession = $this->getSession();
        $sBasket = $oSession->getVariable(self::BESTITAMAZONPAY_TEMP_BASKET);

        if ($sBasket !== null) {
            //init oxbasketitem class first #1746
            $this->getObjectFactory()->createOxidObject('oxBasketItem');

            $oBasket = unserialize($sBasket);
            $this->_validateBasket($oBasket);

            //Reset old basket
            $oSession->setBasket($oBasket);
        }
    }
1231605
public function getBasket()
    {
        if (!$this->basket) {
            try {
                $this->basket = $this->basketFactory->load($this->customerSelector->get());
            } catch (\Exception $e) {
                // something went wrong while loading the basket
                throw $e;
            }
        }

        return $this->basket;
    }
1132758
private function handleGuestBasket()
    {
        $configCartUrl = $this->quote->getStore()->getWebsite()->getConfig(
            \Dotdigitalgroup\Email\Helper\Config::XML_PATH_CONNECTOR_CONTENT_CART_URL
        );

        if ($configCartUrl) {
            $url = $configCartUrl;
        } else {
            $url = 'checkout/cart';
        }
        $this->_redirect($this->quote->getStore()->getUrl($url));
    }
355272
public function getLinksList()
    {
        if ($this->_oLinksList === null) {
            $this->_oLinksList = false;
            // Load links
            $oLinksList = oxNew(\OxidEsales\Eshop\Core\Model\ListModel::class);
            $oLinksList->init("oxlinks");
            $oLinksList->getList();
            $this->_oLinksList = $oLinksList;
        }

        return $this->_oLinksList;
    }
1146616
public function getOrderLink()
    {
        if (($sValue = $this->getViewConfigParam('orderlink')) === null) {
            $sValue = $this->getConfig()->getShopSecureHomeUrl() . 'cl=user';
            $this->setViewConfigParam('orderlink', $sValue);
        }

        return $sValue;
    }
339813
public function getBackUrl()
    {
        if(!empty($this->_mail->getCustomerId())) {
            return $this->getUrl('customer/index/edit', array('id' => $this->_mail->getCustomerId()));
        }

        return $this->getUrl('index/index');
    }
832415
private function get_opening_links()
    {
        $output = '';

        $previous_link = esc_attr(get_pagenum_link(\intval($this->current_page) - 1));
        $first_page_link = esc_attr(get_pagenum_link(1));

        if ($this->args['show_first_last'] && $first_page_link && $this->current_page > 2) {
            $output .= \sprintf($this->args['first_wrapper'], $first_page_link);
        }

        if ($this->args['show_previous_next'] && $previous_link && $this->current_page !== 1) {
            $output .= \sprintf($this->args['previous_wrapper'], $previous_link);
        }

        return $output;
    }
464040
public function GetToBasketLinkForExternalCalls()
    {
        return 'http://'.$this->getPortalDomainService()->getActiveDomain()->getInsecureDomainName().'/'.TdbShopArticle::URL_EXTERNAL_TO_BASKET_REQUEST.'/id/'.urlencode($this->id);
    }
879592
public function redirectOnSuccess() {
		$params = [];
		if (!empty($this->options['bypass_hidden_from_input'])) {
			foreach ($this->options['bypass_hidden_from_input'] as $v) {
				$params[$v] = $this->options['input'][$v] ?? '';
			}
		}
		if (!empty($this->options['collection_current_tab_id'])) {
			$params[$this->options['collection_current_tab_id']] = $this->form_link;
		}
		$url = \Application::get('mvc.full') . '?' . http_build_query2($params) . '#' . ($this->options['input']['__anchor'] ?? '');
		$this->redirect($url);
	}
464603
public function back()
    {
        $referer = $this->request->server()->get('HTTP_REFERER');

        if (null !== $referer) {
            $this->response->redirect($referer);
        } else {
            $this->refresh();
        }

        return $this;
    }
414280
public function changeWrapping()
    {
        $return = parent::changeWrapping();

        // in case user adds wrapping, basket info must be resubmitted..
        if ($this->isPayPal()) {
            $payPalType = (int) $this->getSession()->getVariable("oepaypal");

            if ($payPalType == 1) {
                $return = "payment";
            } else {
                $return = "basket";
            }
        }

        return $return;
    }
481930
public function redirectBackToForm()
    {
        $pageURL = $this->getReturnReferer();
        if (!$pageURL) {
            return $this->redirectBack();
        }

        // Add backURL and anchor
        $pageURL = Controller::join_links(
            $this->addBackURLParam($pageURL),
            '#' . $this->form->FormName()
        );

        // Redirect
        return $this->redirect($pageURL);
    }
739481
public function remove()
    {
        $key = $this->request->param('ID');
        $title = "";

        if (!empty($key)) {
            foreach ($this->items as $item) {
                if ($item->Key == $key) {
                    $title = $item->Title;
                    $this->items->remove($item);
                }
            }

            $this->save();
            
            if ($title) {
                $this->setSessionMessage(
                    "bad",
                    _t(
                        "Checkout.RemovedItem",
                        "Removed '{title}' from your cart",
                        "Message to tell user they removed an item",
                        array("title" => $title)
                    )
                );
            }
        }

        return $this->redirectBack();
    }