protected function getVariantId(OrderProductInterface $orderProduct) { if ($orderProduct->hasVariant()) { return $orderProduct->getVariant()->getId(); } return 0; }
private function refreshOrderProductVariantOptions(OrderProductInterface $orderProduct) { if ($orderProduct->hasVariant()) { $options = $this->variantHelper->getVariantOptions($orderProduct->getVariant()); $orderProduct->setOptions($options); } }