0

I want product review to be shown on the product details page, but reviews should not be shown on the product listing page irrespective of they are available or not.

Kindly help me to do this.

  • which magento version you are using? – Piyush Jan 11 at 7:03
  • Its Magento ver 2.2.7 – Prachi K Jan 11 at 7:18
0

The following file is used for products listing page:

vendor/magento/module-catalog/view/frontend/templates/product/list.phtml

or it may be in your current theme at the following path:

app/design/frontend/{ThemePackage}/{theme}/Magento_Catalog/templates/product/list.phtml

If the file is not in your applied theme, then you need to override it in your applied theme first.

Then open the file and just comment/delete the following line:

<?= $block->getReviewsSummaryHtml($_product, $templateType) ?>

and run the following command:

php bin/magento s:s:d -f (if not developer or default mode)

php bin/magento cache:clean
0

You need to override list.phtml file in your theme.

FILE : vendor/magento/module-catalog/view/frontend/templates/product/list.phtml

Remove following code from your file :

<?= $block->getReviewsSummaryHtml($_product, $templateType) ?>

After that run command :

php bin/magento c:f
  • Thanks a lot.. It worked :) – Prachi K Jan 11 at 7:33
  • Give it to up Vote Then Or Accept Answer by click on Correct Sign :) – Nauman m. Mansuri Jan 11 at 7:43
  • Are you not satisfied with it ? – Nauman m. Mansuri Jan 11 at 8:17

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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