Closed
Description
Yes/No Attributes are not visible on frontend due to error in the file
-/Magento/Catalog/Block/Product/View/Attributes.php
function getAdditionalData(array $excludeAttr = []) check if the attributes value is string but in case of Yes/No Attributes the value is something like this -
object(Magento\Framework\Phrase)#2322 (2) { ["text":"Magento\Framework\Phrase":private]=> string(3) "Yes" ["arguments":"Magento\Framework\Phrase":private]=> array(0) { } }
here is the check for string -
if (is_string($value) && strlen($value)) {
$data[$attribute->getAttributeCode()] = [
'label' => __($attribute->getStoreLabel()),
'value' => $value,
'code' => $attribute->getAttributeCode(),
];
}
other attribute types are working fine for me.
Metadata
Metadata
Assignees
Labels
No labels