I have made a widget to get reviews of all products on a single page. but not be able to show rating stars and products details with that. I tried many solutions but nothing works

    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $_reviewsColFactory = $objectManager->get("\Magento\Review\Model\ResourceModel\Review\CollectionFactory");
    $_storeManager = $objectManager->get('\Magento\Store\Model\StoreManagerInterface');
    $reviewsCollection = $_reviewsColFactory->create()

    foreach($reviewsCollection as $review):?>
        <div class='review-single'>
            <div class="box-review-single">
                <h3> <?php echo $review['nickname'];?></h3>
                <h4 class="title-review"><?php echo $review['title'];?></h4>
                <p class="detail-review"><?php echo $review['detail'];?></p>
    <?php endforeach; ?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.