I trying to look for a solution to show Rating Star on the Product Page, like the Product List Page. I tried adding it by creating a new Block on catalog_product_view.xml but not working
Rating Star on Product List Page
Rating Star on Product List Page

Please help me with the solution for it, thank you!

1 Answer 1


Yep. I resolved my solution . This is my code .

  1. Create catalog_product_view.xml on your theme.
    Add Block

<block class="Magento\Catalog\Block\Product\View\Attributes" name="product.info.review.short"template="Magento_Catalog::product/view/review_short.phtml"/>

Create new file **review_short.phtml** on templates/view/review/ . Add code :
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.

/** @var $block Magento\Catalog\Block\Product\View\Attributes */

$listBlock= $block->getLayout()- 
$templateType = 

$_product = $block->getProduct();
if (!$_product instanceof \Magento\Catalog\Model\Product) {
<?= $listBlock->getReviewsSummaryHtml($_product, $templateType) ?>

enter image description here

Your Answer

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

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