You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If product has boolean attribute, this attribute is not visible on product page view.
For example:
We have product tv, which have attribute:
attribute_code: convr2d3d
frontend_label: Conversation 2D to 3D
frontend_input: boolean
This attribute is not visible on product page in tab More Information.
In this tab must be visible:
Conversation 2D to 3D: Yes
or
Conversation 2D to 3D: No
Depends of value and selected language.
This happens, because in file: magento/module-catalog/Block/Product/View/Attributes.php
in function: public function getAdditionalData(array $excludeAttr = [])
we get value of attribute with: $value = $attribute->getFrontend()->getValue($product);
But instead of returning a (string) value we get a class:
class Magento\Framework\Phrase {
private $text =>
string(3) "Yes"
private $arguments =>
array(0) {
}
}
So in the same function getAdditionalData is checked if is value is type of string.
We have Magento 2.0.7 version.
The text was updated successfully, but these errors were encountered:
If product has boolean attribute, this attribute is not visible on product page view.
For example:
We have product tv, which have attribute:
attribute_code: convr2d3d
frontend_label: Conversation 2D to 3D
frontend_input: boolean
This attribute is not visible on product page in tab More Information.
In this tab must be visible:
Conversation 2D to 3D: Yes
or
Conversation 2D to 3D: No
Depends of value and selected language.
This happens, because in file: magento/module-catalog/Block/Product/View/Attributes.php
in function: public function getAdditionalData(array $excludeAttr = [])
we get value of attribute with: $value = $attribute->getFrontend()->getValue($product);
But instead of returning a (string) value we get a class:
class Magento\Framework\Phrase {
private $text =>
string(3) "Yes"
private $arguments =>
array(0) {
}
}
So in the same function getAdditionalData is checked if is value is type of string.
We have Magento 2.0.7 version.
The text was updated successfully, but these errors were encountered: