0

Is there any setting in Magento admin to remove the reviews tab from product details page?

enter image description here

Here is the contents of catalog_product_view.xml

<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <referenceContainer name="content">
        <block class="Magento\Framework\View\Element\Template"
               name="product-custom.js" as="product-custom.js" template="Magento_Catalog::product/js.phtml"/>
    </referenceContainer>
    <body>
        <!-- Create container for main product tabs -->
        <referenceContainer name="page.wrapper">
            <container name="custom-before-footer-container" before="before-footer-container" label="Luxury Custom - container for main tabs" htmlTag="div" htmlClass="page-before-footer">
                <container name="custom-before-footer-content" label="Luxury Custom - main tabs content" htmlTag="div" htmlClass="content">
                </container>
            </container>
        </referenceContainer>
        <!-- Hide additional tabs -->
        <referenceBlock name="additional-tabs" display="false" />
        <!-- Hide Reviews tab -->
        <referenceBlock name="product.info.details">
            <referenceBlock name="reviews.tab" remove="true"/>
        </referenceBlock>
        <!-- Move product tabs into new place -->
        <move element="product.info.tabs" destination="custom-before-footer-content" before="-"/>
    </body>
</page>

4 Answers 4

1

The Reviews tab on the product page is the Product Review feature from Magento Catalog module.

Your Reviews button on the right screen is Yotpo review.

To remove the Reviews tab, go to Stores > Settings > Configuration > Catalog, open the Product Reviews group, and set the Enabled field to No. Note that this behavior will disable the Product Review feature from Magento_Catalog module.

13
  • Can Yotpo Review button be used by the customers to leave a review? Dec 5, 2022 at 4:47
  • Yes, of course! Let's give it a try.
    – Tu Van
    Dec 5, 2022 at 4:54
  • I disabled it from Magento admin, but the reviews tab is still appearing. I cleared cache as well. Dec 5, 2022 at 6:40
  • If the config was saved in the website scope, you have to change the scope to website to save the config. i.imgur.com/i9WONWW.png
    – Tu Van
    Dec 5, 2022 at 13:11
  • 1
    Sure, will add my solution as none of the solutions in the post helped resolve it. Dec 28, 2022 at 10:09
1

Go to :

app/design/frontend/VendorName/ThemeName/Magento_Catalog/layout/catalog_product_view.xml

and paste the below code :

<?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>
5
  • Thanks, I think view/frontend is not necessary? just this one app/design/frontend/VendorName/ThemeName/Magento_Catalog/layout/catalog_product_view.xml in theme overrriding. Dec 5, 2022 at 11:32
  • Sorry !! It's typo. answer is updated. Dec 5, 2022 at 11:59
  • if it's working then pls mark as accepted and upvote. Dec 5, 2022 at 12:00
  • Hi Rohan, please check my XML file to content and confirm if it is correct. I'm still unable to remove reviews tab. Dec 6, 2022 at 4:42
  • pls add the full file path Dec 6, 2022 at 5:36
0

I just added a conditional statement in the phtml in my theme override.

   <div class="product info detailed">
        <div class="product data items <?php echo $block->getTabsLayout();?>" data-mage-init='{"Swissup_Easytabs/js/tabs": <?= $block->getInitOptions() ?>}' id="swissup-easy-tabs">
            <?php foreach ($tabs as $_index => $_tab) : ?>
                <?php
                    if (strcasecmp($_tab['title'], "Reviews") == 0) {
                        unset($tabs[$_index]);
                        continue;
                    }
                    $alias = $_tab['alias'];
                    $label = $_tab['title'];
                    if ($label == "Product Description") {
                        $_tab['child_html'] = '<div class="std">' . $_tab['child_html'] . '</div>'
                                . '<div class="badge-description">' . $_product->getData('badge_description') . '</div>';
                    }
                    $attributes->setData([
                        'class' => $isExpanded ? 'title' : 'data switch',
                        'id' => "tab-label-{$alias}-title",
                        'data-toggle' => 'switch',
                    ]);
                    if ($_tab['is_ajax']) {
                        $attributes->setData(
                            'data-ajaxurl',
                            $block->getAjaxUrl($alias)
                        );
                    }
                ?>
                <div class="data item title <?php echo $isExpanded ? 'active' : ''?>"
                    aria-labeledby="tab-label-<?php /* @escapeNotVerified */ echo $alias;?>-title"
                    data-role="collapsible"
                    id="tab-label-<?= /* @escapeNotVerified */ $alias ?>">
                <?php if ($isExpanded): ?>
                    <h2 <?= $attributes->serialize() ?>><?= /* @escapeNotVerified */ $label ?></h2>
                <?php else: ?>
                    <a <?= $attributes->serialize() ?>
                        tabindex="-1"
                        href="#<?= $alias ?>">
                        <?= /* @escapeNotVerified */ $label ?>
                    </a>
                <?php endif ?>
                </div>
                <div class="data item content" id="<?= /* @escapeNotVerified */ $alias; ?>" data-role="content">
                    <?= /* @escapeNotVerified */ $_tab['child_html'] ?>
                </div>
            <?php endforeach; ?>
        </div>
    </div>
0

You can simple disable the Reviews tab from the admin panel using below steps.

Go to Stores > Settings > Configuration > Catalog -> Catalog -> Product Reviews -> Enabled -> No -> Save Config.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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