Skip to content

Commit

Permalink
MAGETWO-81916: Attribute category_ids issue #11389
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksii Korshenko authored Nov 28, 2017
2 parents f748f11 + 5983429 commit a0a2474
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/code/Magento/Catalog/Block/Product/View/Attributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,16 @@ public function getAdditionalData(array $excludeAttr = [])
$attributes = $product->getAttributes();
foreach ($attributes as $attribute) {
if ($attribute->getIsVisibleOnFront() && !in_array($attribute->getAttributeCode(), $excludeAttr)) {
$value = $attribute->getFrontend()->getValue($product);

if (is_array($value = $attribute->getFrontend()->getValue($product))) {
continue;
}
if (!$product->hasData($attribute->getAttributeCode())) {
$value = __('N/A');
} elseif ((string)$value == '') {
$value = __('No');
} elseif ($attribute->getFrontendInput() == 'price' && is_string($value)) {
$value = $this->priceCurrency->convertAndFormat($value);
}

if ($value instanceof Phrase || (is_string($value) && strlen($value))) {
$data[$attribute->getAttributeCode()] = [
'label' => __($attribute->getStoreLabel()),
Expand Down

0 comments on commit a0a2474

Please sign in to comment.