Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boolean product attributes are not visible #5354

Closed
bkristl opened this issue Jun 29, 2016 · 1 comment
Closed

Boolean product attributes are not visible #5354

bkristl opened this issue Jun 29, 2016 · 1 comment

Comments

@bkristl
Copy link

bkristl commented Jun 29, 2016

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.

@veloraven
Copy link
Contributor

@bkristl thank you for your report.
We have internal ticket MAGETWO-59267 created for issue #6634.
So I'm closing this issue as duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants