src/ShopBundle/objects/TShopBasket/TShopBasketArticleCoreList.class.php
public function GetBasketSumForDiscount(TdbShopDiscount &$oDiscount)
    {
        // get the sum of all products (we exclude products with "fieldExcludeFromDiscounts")
        $iCurrentPosition = $this->getItemPointer();
        $this->GoToStart();
        $dProductValue = 0;
        while ($oItem = &$this->Next()) {
            $bIncludeProduct = $oDiscount->AllowDiscountForArticle($oItem);
            if ($bIncludeProduct) {
                $dProductValue = $dProductValue + $oItem->dPriceTotal;
            }
        }
        $this->setItemPointer($iCurrentPosition);

        return $dProductValue;
    }
public function GetBasketSumForDiscount(TdbShopDiscount &$oDiscount)
    {
        // get the sum of all products (we exclude products with "fieldExcludeFromDiscounts")
        $iCurrentPosition = $this->getItemPointer();
        $this->GoToStart();
        $dProductValue = 0;
        while ($oItem = &$this->Next()) {
            $bIncludeProduct = $oDiscount->AllowDiscountForArticle($oItem);
            if ($bIncludeProduct) {
                $dProductValue = $dProductValue + $oItem->dPriceTotal;
            }
        }
        $this->setItemPointer($iCurrentPosition);

        return $dProductValue;
    }
public function GetBasketSumForDiscount ( TdbShopDiscount & $ oDiscount ) { // get the sum of all products (we exclude products with "fieldExcludeFromDiscounts") $ iCurrentPosition = $ this -> getItemPointer ( ) ; $ this -> GoToStart ( ) ; $ dProductValue = 0 ; while ( $ oItem = & $ this -> Next ( ) ) { $ bIncludeProduct = $ oDiscount -> AllowDiscountForArticle ( $ oItem ) ; if ( $ bIncludeProduct ) { $ dProductValue = $ dProductValue + $ oItem -> dPriceTotal ; } } $ this -> setItemPointer ( $ iCurrentPosition ) ; return $ dProductValue ; }
returns the total basket value for alle articles that may be used for the discount passed. the method takes
active discounts into account.

@param TdbShopDiscount $oDiscount

@return float
returns the total basket value for alle articles that may be used for the discount passed . the method takes active discounts into account .