Вопрос

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?

Это было полезно?

Решение

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>
Лицензировано под: CC-BY-SA с атрибуция
Не связан с magento.stackexchange
scroll top