- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2018
10:44 PM
01-02-2018
10:44 PM
change in catalog_product_view.xml file
Hello,
I wanted in my product page
>to remove Reviews Tab,
>to remove related text "Be the First to review this product"
>to insert SKU
My original catalog_product_view.xml file contains the following data
<?xml version="1.0"?> <!-- /** * Copyright © 2016 Magento. All rights reserved. * See COPYING.txt for license details. */ --> <page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <move element="page.main.title" destination="product.info.main" before="-"/> <move element="product.info.review" destination="product.info.main" after="page.main.title"/> <move element="product.price.final" destination="product.info.main" after="product.info.review"/> <referenceBlock name="product.info.sku" remove="true" /> </body> </page>
I changed the content to
<?xml version="1.0"?> <!-- /** * Copyright © 2016 Magento. All rights reserved. * See COPYING.txt for license details. */ --> <page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <move element="page.main.title" destination="product.info.main" before="-"/> <move element="product.price.final" destination="product.info.main" after="page.main.title"/> <move element="product.info.sku" destination="product.info.main" after="product.price.final"/> <referenceBlock name="product.info.review" remove="true" /> <referenceBlock name="reviews.tab" remove="true" /> </body> </page>
It is working.
I just want to know if this is OK to change the code like this?
Thanks
Labels:
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2018
03:44 AM
06-07-2018
03:44 AM
Re: change in catalog_product_view.xml file
Hello @bablupali
Yes, It's correct way to remove Review tab but make sure you have changed catalog_product_view.xml in your theme.
Thanks
If It's help's you, Click Kudos/Accept As solutions.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2020
06:29 AM
02-10-2020
06:29 AM
Re: change in catalog_product_view.xml file
hi guys , I'm using magento 2.3 and this file is not effecting anything on front-end.
i tried the code he shared but its not effecting anything
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2020
02:22 AM
04-01-2020
02:22 AM
Re: change in catalog_product_view.xml file
Where is your xml file located?
it should be in app\design\frontend\<Vendor>\<theme>\Magento_Catalog\layout\catalog_product_view.xml