src/ShopBundle/objects/TShopBasket/TShopBasketArticleCoreList.class.php
public function GetBasketQuantityForVoucher(TdbShopVoucher &$oVoucher)
    {
        $iCurrentPosition = $this->getItemPointer();
        $this->GoToStart();
        $iAmount = 0;
        while ($oItem = &$this->Next()) {
            $bIncludeProduct = $oVoucher->AllowVoucherForArticle($oItem);
            if ($bIncludeProduct) {
                $iAmount = $iAmount + $oItem->dAmount;
            }
        }
        $this->setItemPointer($iCurrentPosition);

        return $iAmount;
    }
public function GetBasketQuantityForVoucher(TdbShopVoucher &$oVoucher)
    {
        $iCurrentPosition = $this->getItemPointer();
        $this->GoToStart();
        $iAmount = 0;
        while ($oItem = &$this->Next()) {
            $bIncludeProduct = $oVoucher->AllowVoucherForArticle($oItem);
            if ($bIncludeProduct) {
                $iAmount = $iAmount + $oItem->dAmount;
            }
        }
        $this->setItemPointer($iCurrentPosition);

        return $iAmount;
    }
public function GetBasketQuantityForVoucher ( TdbShopVoucher & $ oVoucher ) { $ iCurrentPosition = $ this -> getItemPointer ( ) ; $ this -> GoToStart ( ) ; $ iAmount = 0 ; while ( $ oItem = & $ this -> Next ( ) ) { $ bIncludeProduct = $ oVoucher -> AllowVoucherForArticle ( $ oItem ) ; if ( $ bIncludeProduct ) { $ iAmount = $ iAmount + $ oItem -> dAmount ; } } $ this -> setItemPointer ( $ iCurrentPosition ) ; return $ iAmount ; }
returns the total number of items affected by a voucher.

@param TdbShopVoucher $oVoucher

@return float
returns the total number of items affected by a voucher .