getVariantIds example



        foreach ($all as $productId => $prices) {
            $container = new CheapestPriceContainer($prices);

            $cheapestPrice->execute([
                'price' => serialize($container),
                'id' => Uuid::fromHexToBytes($productId),
                'version' => $versionId,
            ]);

            $variantIds = $container->getVariantIds();

            if (!$variantIds) {
                continue;
            }

            $existingAccessors = $this->connection->fetchAllKeyValue(
                'SELECT id, cheapest_price_accessor FROM product WHERE parent_id = :id AND version_id = :version',
                ['id' => Uuid::fromHexToBytes($productId), 'version' => $versionId]
            );

            foreach ($container->getVariantIds() as $variantId) {
                
Home | Imprint | This part of the site doesn't use cookies.