2

I'm trying to remove the review tab that appears on product pages and I have added in the two reference blocks below in catalog_product_view.xml.

<block class="Magento\Catalog\Block\Product\View" name="product.info.review" template="product/view/review.phtml"/>
<referenceBlock name="product.info.review" remove="true" />
<referenceBlock name="reviews.tab" remove="true" />

However this has not just removed the review tab but also the Description and Additional Information Tabs. Is there a way of just removing the review tab and nothing else?

My Magento version is 2.2.4

1

app/code/Vendor/YourTheme/view/frontend/layout/catalog_product_view.xml


<?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.details">
            <referenceBlock name="reviews.tab" remove="true"/>
        </referenceBlock>
    </body>
</page>
  • This does the same of removing all tabs rather than just the reviews tab. Is there a way to differentiate between the tabs so you only remove one? – ITMTS Feb 25 at 16:24
  • This code removing only review tab only, not whole. This code working fine with M2.3 – Sohel Rana Feb 25 at 16:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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