public function getOrderItemFull(Order $order) { if ($order === null) { $order = $this->getOrder(); } $product = $this->getProduct(); $product->enableAttachments(); $orderItem = new OrderItem($order); $orderItem->setProduct($product); $orderItem->setQuantity(1); $orderItem->setPrice($this->getPriceFull()); $orderItem->addOrderItemOptionProduct($this->getOrderItemOptionProduct()); $orderItem->addOrderItemOptionValue($this->getOrderItemOptionValue()); $orderItem->addOrderItemTextOptionValue($this->getOrderItemTextOptionValue()); $orderItem->addAttachment($this->getAttachment()); return $orderItem; }