At the moment i have this piece of code working, with a little help. But last thing is that i would like the product name to show instead of the product id numberand i would like to show the stars given in the review. Thanks for helping.
<?php
$Collection=Mage::getModel('review/review')->getCollection()
->setPageSize(5)
->addStoreFilter(Mage::app()->getStore()->getId())
->addStatusFilter(Mage_Review_Model_Review::STATUS_APPROVED)
->addRateVotes()
->setDateOrder();
$_items = array_reverse( $Collection->getItems());
foreach ($_items as $_review):
$productId = $_review->getentity_pk_value();
$_review->getTitle();
$_votes = $_review->getRatingVotes();
$_review->getDetail();
$this->formatDate($_review->getCreatedAt());
$this->__('[Posted %s]', $this->formatDate($_review->getCreatedAt()), 'long');
echo "<ul><h3>".$productId = $_review->getentity_pk_value()."</h3>";
echo "<li><h4>".$_review->getTitle()."</h4></li>";
echo "<li>".$_review->getDetail()."</li>";
echo "<li>". $this->formatDate($_review->getCreatedAt())."</li>";
endforeach;
?>
Best Answer
I have just had a look at the code for this within:
Then added the ratings from here to your code. Replace your code within your phtml file with below: