cartGoods = $cartGoods; $this->cartGoods->getCartGoodsExtraCharges()->push($this); } public function toArray() { $this->amount = sprintf('%.2f', $this->amount); return parent::toArray(); // TODO: Change the autogenerated stub } }