In the below code i am getting the rating percentage .How can i get the review title, description, nickname and submitted date.

public function ProductReview()
    $_productID = 70;
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $_product= $objectManager->create("Magento\Catalog\Model\Product")->load($_productID);
    $_reviewFact->create()->getEntitySummary($_product, 1);  
     // Below code will get the rating summary
 return $rat;

Please try the below code in test script in the root folder of magento2

use Magento\Framework\App\Bootstrap;
require __DIR__ . '/app/bootstrap.php';
$bootstrap = Bootstrap::create(BP, $_SERVER);
$obj = $bootstrap->getObjectManager();
$state = $obj->get('Magento\Framework\App\State');

ini_set('display_errors', 1);
echo "All reviews of the product </br>";

$sku = '24-MB02';
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$product = $objectManager->create("Magento\Catalog\Model\Product")->loadByAttribute('sku', $sku); //use load($producID) if you have product id
$storeManager = $objectManager->get('Magento\Store\Model\StoreManagerInterface');
$currentStoreId = $storeManager->getStore()->getId();
$rating = $objectManager->get("Magento\Review\Model\ResourceModel\Review\CollectionFactory");

$collection = $rating->create()->addStoreFilter(
echo "<pre>";
print_r($collection->getData()); //Get all review data of product
  • :Nagaraju Kasa: I have a small doubt here how can we get the rating(star) by each customer.? – srg Sep 14 '17 at 9:18
  • 2
    hi @srg i hope u r looking for this. please check this link magento.stackexchange.com/questions/187282/… – Nagaraju K Sep 18 '17 at 4:57
  • hi @srg if u r satisfied with my answer please do upvote for an encouragement thanks – Nagaraju K Sep 18 '17 at 4:58
  • thanks @srg please rise the upvote so that it will useful for others – Nagaraju K Sep 18 '17 at 11:40
  • 1
    : i have upvoted that comment. – srg Sep 19 '17 at 5:32

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