문제

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?

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top