public function getCartTotalPrice($withItemsInPromo = true)
    {
        $total = 0;

        $cartItems = $this->getRequest()->getSession()->getSessionCart($this->getDispatcher())->getCartItems();

        foreach ($cartItems as $cartItem) {
            if ($withItemsInPromo || ! $cartItem->getPromo()) {
                $total += $cartItem->getRealPrice() * $cartItem->getQuantity();
            }
        }

        return $total;
    }
public function getCartTotalPrice($withItemsInPromo = true)
    {
        $total = 0;

        $cartItems = $this->getRequest()->getSession()->getSessionCart($this->getDispatcher())->getCartItems();

        foreach ($cartItems as $cartItem) {
            if ($withItemsInPromo || ! $cartItem->getPromo()) {
                $total += $cartItem->getRealPrice() * $cartItem->getQuantity();
            }
        }

        return $total;
    }
public function getCartTotalPrice ( $ withItemsInPromo = true ) { $ total = 0 ; $ cartItems = $ this -> getRequest ( ) -> getSession ( ) -> getSessionCart ( $ this -> getDispatcher ( ) ) -> getCartItems ( ) ; foreach ( $ cartItems as $ cartItem ) { if ( $ withItemsInPromo || ! $ cartItem -> getPromo ( ) ) { $ total += $ cartItem -> getRealPrice ( ) * $ cartItem -> getQuantity ( ) ; } } return $ total ; }
Return Products total price

@param bool $withItemsInPromo if true, the discounted items are included in the total

@return float
Return Products total price