protected function CheckBasketVoucherAvailable($sMessageConsumer)
    {
        $bBasketVoucherAvailable = true;
        $oVoucherList = $this->GetVoucherList();
        $oMessageManager = TCMSMessageManager::GetInstance();
        if ($oVoucherList) {
            if ($oVoucherList->Length() > 0) {
                $oVoucherList->GoToStart();
                while ($oBasketVoucher = $oVoucherList->Next()) {
                    $sVoucherCode = $oBasketVoucher->fieldCode;
                    $sBasketVoucherKey = $oBasketVoucher->sBasketVoucherKey;
                    $sBasketVoucherSeriesId = $oBasketVoucher->fieldShopVoucherSeriesId;
                    $oVoucher = TdbShopVoucher::GetNewInstance();
                    $bVoucherLoaded = $oVoucher->Load($oBasketVoucher->id);
                    if (($bVoucherLoaded && $oVoucher->fieldIsUsedUp) || !$bVoucherLoaded) {
                        $oNextAvailableVoucher = $this->GetNextAvailableVoucher($sVoucherCode, $sBasketVoucherSeriesId, $sMessageConsumer);

                        /**
                         * next voucher with same code is available, so auto add that one.
                         * as we do not want to inform the customer that this happened,
                         * we create a temporary message consumer for RemoveVoucher and AddVoucher messages and clear them afterwards.
                         */
                        if (!is_null($oNextAvailableVoucher)) {
                            $this->RemoveVoucher($sBasketVoucherKey, $sMessageConsumer.'-TO-BE-REMOVED');
                            $this->AddVoucher($oNextAvailableVoucher, $sMessageConsumer.'-TO-BE-REMOVED');
                            $oMessageManager->ClearMessages($sMessageConsumer.'-TO-BE-REMOVED');
                        } else {
                            $this->RemoveVoucher($sBasketVoucherKey, $sMessageConsumer);
                            $bBasketVoucherAvailable = false;
                            $this->bMarkAsRecalculationNeeded = true;
                            $oMsgManager = TCMSMessageManager::GetInstance();
                            $oMsgManager->AddMessage($sMessageConsumer, 'ERROR-ORDER-REQUEST-VOUCHER-NOT-LONGER-AVAILABLE', array('sVoucherCode' => $sVoucherCode));
                        }
                    }
                }
            }
        }

        return $bBasketVoucherAvailable;
    }