How can I remove the sku only for grouped products? Since a grouped product is composed of many simple products, I do not need the grouped product sku to display. How can I remove this only for the grouped product?

up vote 6 down vote accepted

Create catalog_product_view_type_grouped.xml under your module like below path:

app/code/Vendor/Module/view/frontend/layout/catalog_product_view_type_grouped.xml

OR

create under

app/design/frontend/Vendor/Module/Magento_Catalog/layout/catalog_product_view_type_grouped.xml

And add the below code to it:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="product.info.sku" remove="true"/>
    </body>
</page>
  • This worked! I already had that file so I just added the following code before the </body> tag: <referenceBlock name="product.info.sku" remove="true"/> – Will Cousin Aug 10 at 15:49
  • Great! Happy Coding. – Sukumar Gorai Aug 10 at 15:50

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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