2

I need to Remove Review tab and their content in product detail page. I can find Details and More Information tab in catalog_product_view.xml under the group attribute detailed_info. But I can't found anything related to Review tab Declaration.In debug mode also not provide that much detail to find layout.

for example I found Detail tab in catalog_product_view.xml

<argument name="title" translate="true" xsi:type="string">Details</argument>

which layout xml file contain review tab declaration?

Manashvi Birla
  • 8,833
  • 9
  • 27
  • 53
Bilal Usean
  • 9,977
  • 14
  • 75
  • 122

3 Answers3

8

If you are using the default luma theme, then go to

your magento root/vendor/magento/theme-frontend-luma/Magento_Theme/layout/default.xml

add below line inside the <body> tag :

<referenceBlock name="reviews.tab" remove="true" />
  <referenceBlock name="product.review.form" remove="true" />
  <referenceBlock name="product.info.review" remove="true" />

If you are using a custom theme, you need to do the same change at below location :

your magento root/app/design/frontend/Your Theme NAME_SPACE/theme name/etc/Magento_Theme/layout/default.xml

P.S. Flush the cache after you finish, to see the change.

Manashvi Birla
  • 8,833
  • 9
  • 27
  • 53
2

Magento have Review module. Check following file where declare reviews.tab.


Magento/Review/view/frontend/layout/catalog_product_view.xml

Manashvi Birla
  • 8,833
  • 9
  • 27
  • 53
Sohel Rana
  • 35,846
  • 3
  • 72
  • 90
  • OMG I thought all the product detail page elements are resides on Magento/Catalog. How you found appropriate layout easily any tricks you have please share with this answer its more helpful to beginners – Bilal Usean Apr 05 '16 at 17:35
1

In magento2 you can remove any block by their name.
For exp:
<referenceBlock name="footer_links" remove="true"/>

To do this we need to create a custom theme, don't touch the default Magento file for best practice. For create a theme follow this link : How to create a Child Theme in Magento 2, If you have already a custom theme skip this one.

Now open app/design/frontend/theme_package/theme/Magento_Theme/layout/default.xml and under <body> node put the following code:

<referenceBlock name="reviews.tab" remove="true"/>

Clear your magento cache refresh the page.
In the same way you can remove other unnecessary block from your site.

Arunendra
  • 7,446
  • 3
  • 29
  • 54
  • thanks for the reply I know this procedure already. I think my title lead to misunderstood the question, I need to know which layout contain reviews tab declaration(which xml file?). – Bilal Usean Apr 05 '16 at 15:14