3

I tried to disable the module output for reviews (by changing my configuration), I now have the following (removed other configuration settings):

'websites' => [
    'base' => [
        'advanced' => [
            'modules_disable_output' => [
                'Magento_Review' => '1',
            ],
        ],
    ],
],

Which according to the docs should disable the reviews but when looking at the product page the reviews tab is still active? I tried flushing all caches, executed bin/magento setup:di:compile but obviously I am doing something wrong but I can't seem to find out what I'm missing here.

1 Answers1

0

From the doc I see this:

'system' =>
  array (
    'websites' =>
    array (
      'base' =>
      array (
        'advanced' =>
        array (
          'modules_disable_output' =>
          array (
            'Magento_Review' => '1',
          ),
        ),
      ),
    ),
  ),

I see that you haven't included system => array( part. Check if that's the case.

Alternative way:

I would remove the functionality from the theme. Just create a child theme (if you don't have one already) check below link:

How to create a Child Theme in Magento 2, and then inside your child theme create:

app/design/frontend/company_name/theme_name/Magento_Theme/layout/default.xml

and add this:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <!--referenceBlock name="reviews.tab" remove="true" />
        <referenceBlock name="product.info.review" remove="true" /-->
        <referenceBlock name="product.review.form" remove="true" />
    </body>
</page>

Ref

Adarsh Khatri
  • 8,360
  • 2
  • 25
  • 58