productIdsParameterIsMissing example

return $wishlistIds->firstId() ?? Uuid::randomHex();
    }

    /** * @return array<array{id: string, productId?: string, productVersionId?: Defaults::LIVE_VERSION}> */
    private function buildUpsertProducts(RequestDataBag $data, string $wishlistId, SalesChannelContext $context): array
    {
        $productIds = $data->get('productIds');
        if (!$productIds instanceof DataBag) {
            throw CustomerException::productIdsParameterIsMissing();
        }

        $ids = array_unique(array_filter($productIds->all()));

        if (\count($ids) === 0) {
            return [];
        }

        /** @var array<string> $ids */
        $ids = $this->productRepository->searchIds(new Criteria($ids)$context)->getIds();

        
Home | Imprint | This part of the site doesn't use cookies.