public function getTotalCost() {
        $totalCost = $this->getCost();
        $adjustmentTotal = 0;

        foreach ($this->adjustments as $adjustment) {
            $adjustmentObject = Yii::createObject($adjustment);
            if($adjustmentObject instanceof CartSumAdjustment) {
                $adjustmentTotal += $adjustmentObject->countAdjustment($totalCost);
            }
        }

        return $totalCost + $adjustmentTotal;
    }
public function getTotalCost() {
        $totalCost = $this->getCost();
        $adjustmentTotal = 0;

        foreach ($this->adjustments as $adjustment) {
            $adjustmentObject = Yii::createObject($adjustment);
            if($adjustmentObject instanceof CartSumAdjustment) {
                $adjustmentTotal += $adjustmentObject->countAdjustment($totalCost);
            }
        }

        return $totalCost + $adjustmentTotal;
    }
public function getTotalCost ( ) { $ totalCost = $ this -> getCost ( ) ; $ adjustmentTotal = 0 ; foreach ( $ this -> adjustments as $ adjustment ) { $ adjustmentObject = Yii :: createObject ( $ adjustment ) ; if ( $ adjustmentObject instanceof CartSumAdjustment ) { $ adjustmentTotal += $ adjustmentObject -> countAdjustment ( $ totalCost ) ; } } return $ totalCost + $ adjustmentTotal ; }
Gets total cost of user's incomplete order from session if user is guest
or from DB if user is authenticated
@return mixed
Gets total cost of user s incomplete order from session if user is guest or from DB if user is authenticated