/** * {@inheritdoc} */ public function setProduct($productCode, ProductInterface $product) { $this->product = $product; $this->productId = $product->getId(); $this->productCode = $productCode; $this->name = $product->getName(); $this->price = $product->getPrice(); $this->options = $product->getOptions(); }