public function discount($throwErrors = false) { $total = app(LaraCart::SERVICE)->subTotal(false) - $this->value; if ($total < 0) { return 0; } return $this->value; }