32 if ($attributeOptionsData) {
33 $productAttribute =
$attribute->getProductAttribute();
34 $attributeId = $productAttribute->getId();
37 'code' => $productAttribute->getAttributeCode(),
38 'label' => $productAttribute->getStoreLabel(
$product->getStoreId()),
39 'options' => $attributeOptionsData,
47 'defaultValues' => $defaultValues,
58 $attributeOptionsData = [];
59 foreach (
$attribute->getOptions() as $attributeOption) {
60 $optionId = $attributeOption[
'value_index'];
61 $attributeOptionsData[] = [
63 'label' => $attributeOption[
'label'],
69 return $attributeOptionsData;
79 return $product->hasPreconfiguredValues()
80 ?
$product->getPreconfiguredValues()->getData(
'super_attribute/' . $attributeId)
getAttributeConfigValue($attributeId, $product)
getAttributeOptionsData($attribute, $config)
getAttributesData(Product $product, array $options=[])