public function total($format = true, $withDiscount = true, $withTax = true, $withFees = true)
    {
        $total = $this->subTotal(false);

        if ($withFees) {
            $total += $this->feeTotals(false);
        }

        if ($withDiscount) {
            $total -= $this->totalDiscount(false, false);
        }

        if ($withTax) {
            $total += $this->taxTotal(false, $withFees, false);
        }

        return $this->formatMoney($total, null, null, $format);
    }
public function total($format = true, $withDiscount = true, $withTax = true, $withFees = true)
    {
        $total = $this->subTotal(false);

        if ($withFees) {
            $total += $this->feeTotals(false);
        }

        if ($withDiscount) {
            $total -= $this->totalDiscount(false, false);
        }

        if ($withTax) {
            $total += $this->taxTotal(false, $withFees, false);
        }

        return $this->formatMoney($total, null, null, $format);
    }
public function total ( $ format = true , $ withDiscount = true , $ withTax = true , $ withFees = true ) { $ total = $ this -> subTotal ( false ) ; if ( $ withFees ) { $ total += $ this -> feeTotals ( false ) ; } if ( $ withDiscount ) { $ total -= $ this -> totalDiscount ( false , false ) ; } if ( $ withTax ) { $ total += $ this -> taxTotal ( false , $ withFees , false ) ; } return $ this -> formatMoney ( $ total , null , null , $ format ) ; }
Gets the total of the cart with or without tax.

@param bool $format
@param bool $withDiscount
@param bool $withTax
@param bool $withFees

@return string
Gets the total of the cart with or without tax .