Magento Get Review URL
My latest project is a Magento Shopping cart. Alot of this theme needed some custom features added, not in the code core already. The first of this was adding the Review Link outside of the summary review template. This used to be done by using the reviews helper. In the latest version of Magento, this no longer exists. After digging through core files, I finally found the class that creates the review URL. I first noticed the getReviewURL() was returning the curent products link page and NOT the review form page. I am not sure if this is a bug or was done on purpose. So I added a new method to the class so that I can call the Review URL.
Location of the file: app\code\core\Mage\Review\Block\Product\View\List.php
public function getReviewLink($id)
{
return Mage::getUrl('review/product/list', array('id'=> $id));
}
After adding this method, I can now call it on the Review listing template.
Location of review listing template: app\design\frontend\faction\template\review\product\view\list.phtml
< a href="< ?php echo $this->getReviewLink($this->getProductId()) ? >#review-form">Post a review.< / a>
We pass the product’s ID to the method and the link is construct and returned.





