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?
1 Answer
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"/> Commented Aug 10, 2018 at 15:49
-