src/ShopBundle/objects/WebModules/MTShopBasketCore/MTShopBasketCoreEndpoint.class.php
protected function ClearBasket()
    {
        $oBasket = TShopBasket::GetInstance();
        if ($oBasket->iTotalNumberOfUniqueArticles > 0) {
            $oBasket->ClearBasket();
            $aParams = $this->global->GetUserData();
            if (array_key_exists('basket', $aParams) && is_array($aParams['basket'])) {
                if (array_key_exists(self::URL_CLEAR_BASKET_NAME, $aParams['basket'])) {
                    unset($aParams['basket'][self::URL_CLEAR_BASKET_NAME]);
                }
            }
            $sURL = $this->getActivePageService()->getLinkToActivePageRelative($aParams, array('pagedef'));
            $this->getRedirect()->redirect($sURL);
        }
    }
protected function ClearBasket()
    {
        $oBasket = TShopBasket::GetInstance();
        if ($oBasket->iTotalNumberOfUniqueArticles > 0) {
            $oBasket->ClearBasket();
            $aParams = $this->global->GetUserData();
            if (array_key_exists('basket', $aParams) && is_array($aParams['basket'])) {
                if (array_key_exists(self::URL_CLEAR_BASKET_NAME, $aParams['basket'])) {
                    unset($aParams['basket'][self::URL_CLEAR_BASKET_NAME]);
                }
            }
            $sURL = $this->getActivePageService()->getLinkToActivePageRelative($aParams, array('pagedef'));
            $this->getRedirect()->redirect($sURL);
        }
    }
protected function ClearBasket ( ) { $ oBasket = TShopBasket :: GetInstance ( ) ; if ( $ oBasket -> iTotalNumberOfUniqueArticles > 0 ) { $ oBasket -> ClearBasket ( ) ; $ aParams = $ this -> global -> GetUserData ( ) ; if ( array_key_exists ( 'basket' , $ aParams ) && is_array ( $ aParams [ 'basket' ] ) ) { if ( array_key_exists ( self :: URL_CLEAR_BASKET_NAME , $ aParams [ 'basket' ] ) ) { unset ( $ aParams [ 'basket' ] [ self :: URL_CLEAR_BASKET_NAME ] ) ; } } $ sURL = $ this -> getActivePageService ( ) -> getLinkToActivePageRelative ( $ aParams , array ( 'pagedef' ) ) ; $ this -> getRedirect ( ) -> redirect ( $ sURL ) ; } }
clear all products from the basket and redirect to active page.
clear all products from the basket and redirect to active page .