Frage

I have added the following code to catalog_product_view.xml to show the SKU in the list of attributes inside the "More information" tab

<referenceBlock name="product.info.details">
  <referenceBlock name="product.attributes">
      <arguments>
        <argument name="at_call" xsi:type="string">getSku</argument>
        <argument name="at_code" xsi:type="string">sku</argument>
        <argument name="css_class" xsi:type="string">sku</argument>
      </arguments>
    </referenceBlock>
</referenceBlock>

The other customizations in the file are visible, but not this one. Any idea?

War es hilfreich?

Lösung

You don't need to do anything like that

You just follow below step to display sku in More Information tab on product view page

  1. Go to Stores -> Attributes -> Product

enter image description here

  1. Search SKU attribute and edit it

enter image description here

  1. Go to Storefront Properties tab and change Visible on Catalog Pages on Storefront value from No to Yes

enter image description here

Result :

enter image description here

Note : Flush cache and check

Hope this will help you

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit magento.stackexchange
scroll top