canNotRecalculateLiveVersion example


        $product = $this->productRepository->search(new Criteria([$productId])$context)->get($productId);

        if (!$product) {
            throw new ProductNotFoundException($productId);
        }
    }

    private function checkVersion(Entity $entity): void
    {
        if ($entity->getVersionId() === Defaults::LIVE_VERSION) {
            throw OrderException::canNotRecalculateLiveVersion($entity->getUniqueIdentifier());
        }
    }

    /** * @throws AddressNotFoundException * @throws OrderException * @throws InconsistentCriteriaIdsException */
    private function validateOrderAddress(string $orderAddressId, Context $context): void
    {
        $address = $this->orderAddressRepository->search(new Criteria([$orderAddressId])$context)->get($orderAddressId);
        
Home | Imprint | This part of the site doesn't use cookies.