entityManager = $entityManager; $this->priceSolver = $priceSolver; $this->orderProductStore = $orderProductStore; } public function init(OrderProductInterface $orderProduct) :OrderProductInterface { $orderProduct->setTitle($orderProduct->getTitleOrderShop()); $orderProduct->setPrice($this->priceSolver->getPrice($orderProduct->getProduct())); $orderProduct->setBuyingPrice($this->priceSolver->getBuyingPrice($orderProduct->getProduct())); $orderProduct->setUnit($orderProduct->getProduct()->getUnitInherited()); $orderProduct->setTaxRate($orderProduct->getProduct()->getTaxRateInherited()); $orderProduct->setQuantityProduct($orderProduct->getProduct()->getQuantityInherited()); return $orderProduct; } }