Issue #855 fixed
This commit is contained in:
parent
c585186a88
commit
e18fd4e5c4
|
|
@ -184,8 +184,8 @@ class ProductFlat
|
||||||
if (in_array($attribute->code, ['short_description', 'tax_category_id', 'meta_title', 'meta_keywords', 'meta_description', 'width', 'height']))
|
if (in_array($attribute->code, ['short_description', 'tax_category_id', 'meta_title', 'meta_keywords', 'meta_description', 'width', 'height']))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// if (! Schema::hasColumn('product_flat', $attribute->code))
|
if (! Schema::hasColumn('product_flat', $attribute->code))
|
||||||
// continue;
|
continue;
|
||||||
|
|
||||||
if ($attribute->value_per_channel) {
|
if ($attribute->value_per_channel) {
|
||||||
if ($attribute->value_per_locale) {
|
if ($attribute->value_per_locale) {
|
||||||
|
|
@ -217,6 +217,24 @@ class ProductFlat
|
||||||
$productFlat->{$attribute->code . '_label'} = $attributeOption->admin_name;
|
$productFlat->{$attribute->code . '_label'} = $attributeOption->admin_name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} elseif ($attribute->type == 'multiselect') {
|
||||||
|
$attributeOptionIds = explode(',', $product->{$attribute->code});
|
||||||
|
|
||||||
|
if (count($attributeOptionIds)) {
|
||||||
|
$attributeOptions = $this->attributeOptionRepository->findWhereIn('id', $attributeOptionIds);
|
||||||
|
|
||||||
|
$optionLabels = [];
|
||||||
|
|
||||||
|
foreach ($attributeOptions as $attributeOption) {
|
||||||
|
if ($attributeOptionTranslation = $attributeOption->translate($locale->code)) {
|
||||||
|
$optionLabels[] = $attributeOptionTranslation->label;
|
||||||
|
} else {
|
||||||
|
$optionLabels[] = $attributeOption->admin_name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$productFlat->{$attribute->code . '_label'} = implode(', ', $optionLabels);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue