diff --git a/src/Factory/Product/ProductAttributeValueViewFactory.php b/src/Factory/Product/ProductAttributeValueViewFactory.php index 57c4a03b3..d2f5fffd4 100644 --- a/src/Factory/Product/ProductAttributeValueViewFactory.php +++ b/src/Factory/Product/ProductAttributeValueViewFactory.php @@ -40,6 +40,16 @@ public function create(ProductAttributeValueInterface $productAttributeValue, st $productAttributeTranslation = $productAttribute->getTranslation($localeCode); $productAttributeValueView->name = $productAttributeTranslation->getName(); + if ($productAttribute && $productAttribute->getType() === 'select') { + $configuration = $productAttribute->getConfiguration(); + $productAttributeValueView->value = array_map( + static function (string $value) use ($configuration, $locale) { + return $configuration['choices'][$value][$locale]; + }, + $productAttributeValueView->value + ); + } + return $productAttributeValueView; } }