diff --git a/code_samples/api/product_catalog/src/Command/ProductVariantCommand.php b/code_samples/api/product_catalog/src/Command/ProductVariantCommand.php index 0a69ab3b9c..92c7dab42d 100644 --- a/code_samples/api/product_catalog/src/Command/ProductVariantCommand.php +++ b/code_samples/api/product_catalog/src/Command/ProductVariantCommand.php @@ -99,6 +99,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int ); $redVariants = $this->productService->findVariants($colorQuery); + foreach ($redVariants->getVariants() as $variant) { + $output->writeln($variant->getName()); + } + return self::SUCCESS; } }