LukePOLO\LaraCart\CartItem::price PHP Method

price() public method

Gets the price of the item with or without tax, with the proper format.
public price ( boolean $format = true, boolean $taxedItemsOnly = false ) : string
$format boolean
$taxedItemsOnly boolean
return string
    public function price($format = true, $taxedItemsOnly = false)
    {
        return LaraCart::formatMoney($this->price + $this->subItemsTotal(false, $taxedItemsOnly), $this->locale, $this->internationalFormat, $format);
    }