LukePOLO\LaraCart\CartItem::subItemsTotal PHP Method

subItemsTotal() public method

Gets the totals for the options.
public subItemsTotal ( boolean $format = true, boolean $taxedItemsOnly = false ) : string
$format boolean
$taxedItemsOnly boolean
return string
    public function subItemsTotal($format = true, $taxedItemsOnly = false)
    {
        $total = 0;
        foreach ($this->subItems as $subItem) {
            $total += $subItem->price(false, $taxedItemsOnly);
        }
        return LaraCart::formatMoney($total, $this->locale, $this->internationalFormat, $format);
    }