src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php
public function RemoveVoucher($sBasketVoucherKey, $sMessageHandler)
    {
        $bRemoved = $this->GetActiveVouchers()->RemoveItem('sBasketVoucherKey', $sBasketVoucherKey);
        $oMessageManager = TCMSMessageManager::GetInstance();
        if ($bRemoved) {
            $oMessageManager->AddMessage($sMessageHandler, 'VOUCHER-REMOVED');
            $this->SetBasketRecalculationFlag();
        } else {
            $oMessageManager->AddMessage($sMessageHandler, 'VOUCHER-ERROR-NOT-FOUND');
        }

        return $bRemoved;
    }
public function RemoveVoucher($sBasketVoucherKey, $sMessageHandler)
    {
        $bRemoved = $this->GetActiveVouchers()->RemoveItem('sBasketVoucherKey', $sBasketVoucherKey);
        $oMessageManager = TCMSMessageManager::GetInstance();
        if ($bRemoved) {
            $oMessageManager->AddMessage($sMessageHandler, 'VOUCHER-REMOVED');
            $this->SetBasketRecalculationFlag();
        } else {
            $oMessageManager->AddMessage($sMessageHandler, 'VOUCHER-ERROR-NOT-FOUND');
        }

        return $bRemoved;
    }
public function RemoveVoucher ( $ sBasketVoucherKey , $ sMessageHandler ) { $ bRemoved = $ this -> GetActiveVouchers ( ) -> RemoveItem ( 'sBasketVoucherKey' , $ sBasketVoucherKey ) ; $ oMessageManager = TCMSMessageManager :: GetInstance ( ) ; if ( $ bRemoved ) { $ oMessageManager -> AddMessage ( $ sMessageHandler , 'VOUCHER-REMOVED' ) ; $ this -> SetBasketRecalculationFlag ( ) ; } else { $ oMessageManager -> AddMessage ( $ sMessageHandler , 'VOUCHER-ERROR-NOT-FOUND' ) ; } return $ bRemoved ; }
remove the voucher with the given basket key from the voucher list. Results will be sent to sMessageHandler.

@param string $sBasketVoucherKey - The basket key of the voucher
@param string $sMessageHandler

@return bool
remove the voucher with the given basket key from the voucher list . Results will be sent to sMessageHandler .