Table of Contents & Menu
Navigation

Product Detail Page Attributes

Hyvä displays product attributes in two main locations on the Product Detail Page:

  1. Below the short description, managed by the Magento_Catalog::product/view/product-info.phtml template.
  2. In the "More Information" section at the end of the page, managed by the Magento_Catalog::product/view/attributes.phtml template.

Below the Short Description

Attributes appearing below the short description are configured via Layout XML as arguments to the product.info block.

<block class="Magento\Catalog\Block\Product\View"
       name="product.info"
       template="Magento_Catalog::product/view/product-info.phtml">
    <arguments>
        <!-- Use `default` as the value for `call` unless you want a specific method to be used. -->
        <argument name="attributes" xsi:type="array">
            <item name="sku" xsi:type="array">
                <item name="call" xsi:type="string">getSku</item>
                <item name="code" xsi:type="string">sku</item>
                <item name="label" xsi:type="string">default</item>
                <item name="css_class" xsi:type="string">sku</item>
            </item>
            <item name="color" xsi:type="array">
                <item name="call" xsi:type="string">default</item>
                <item name="code" xsi:type="string">color</item>
                <item name="label" xsi:type="string">default</item>
                <item name="css_class" xsi:type="string">color</item>
            </item>
            ...
        </argument>
    </arguments>
</block>

Each attribute is defined as a sub-array within the attributes argument, requiring these properties:

Property Meaning
call The string default or a specific getter method name (e.g., getSku). Use default if unsure.
code The attribute code (e.g., material).
label The string default or a custom attribute label (e.g., Quality).
css_class This property is currently not used.

To hide these attributes, override the product-info.phtml template in your custom theme and remove the relevant HTML.

In the More Information section

Attributes in the "More Information" section are controlled by their EAV attribute properties.

Any product attribute with "Is Visible On Frontend" set to "Yes" will be displayed here. To modify their appearance or hide individual attributes, adjust their properties in the Magento Admin (or directly in the database).

To hide the entire "More Information" section, remove the product.attributes block using Layout XML:

<page>
    <body>
        <referenceBlock name="product.attributes" remove="true"/>
    </body>
</page>