I've got this code in my catalog_category_view.xml file:

<block class="Magento\Catalog\Block\Product\View\Description" name="product.info.condition" template="product/view/attribute.phtml" before="product.info.sku">
        <argument name="at_call" xsi:type="string">getCondition</argument>
        <argument name="at_code" xsi:type="string">condition</argument>
        <argument name="css_class" xsi:type="string">condition</argument>
        <argument name="at_label" xsi:type="string">CONDITION:</argument>
        <argument name="add_attribute" xsi:type="string">itemprop="condition"</argument>

The Label "Condition" renders but the attribute value only returns the ID number and not the Dropdown value.

May I ask what I am missing?


Found a solution here: Magento 2 - How to get attribute of product?

<argument name="at_type" xsi:type="string">text</argument>
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.