diff --git a/src/CartItem.php b/src/CartItem.php index cf45500f..c5eef06c 100644 --- a/src/CartItem.php +++ b/src/CartItem.php @@ -274,24 +274,24 @@ public function __get($attribute) return $this->{$attribute}; } - if($attribute === 'priceTax') { - return $this->numberFormat( ($this->price + $this->tax) ); + if ($attribute === 'priceTax') { + return number_format(($this->price + $this->tax), 2, '.', ''); } - - if($attribute === 'subtotal') { - return $this->numberFormat( ($this->qty * $this->price) ); + + if ($attribute === 'subtotal') { + return number_format(($this->qty * $this->price), 2, '.', ''); } - - if($attribute === 'total') { - return $this->numberFormat( ($this->qty * $this->priceTax) ); + + if ($attribute === 'total') { + return number_format(($this->qty * $this->priceTax), 2, '.', ''); } - if($attribute === 'tax') { - return $this->numberFormat( ($this->price * ($this->taxRate / 100)) ); + if ($attribute === 'tax') { + return number_format(($this->price * ($this->taxRate / 100)), 2, '.', ''); } - - if($attribute === 'taxTotal') { - return $this->numberFormat( ($this->tax * $this->qty) ); + + if ($attribute === 'taxTotal') { + return number_format(($this->tax * $this->qty), 2, '.', ''); } if($attribute === 'model' && isset($this->associatedModel)) {