I have 'Write a review' link in my product details page.It was working fine in magento Now when I migrated my code to fresh magento The link is not working instead a page like this is opening indicating error:

enter image description here

Should I do anything at backend admin panel?

Here is my code which I used to display the 'Write a review' link in details page.

<div class="extra-info">
                        $summaryData = Mage::getModel('review/review_summary')->setStoreId($storeId)->load($_product->getId()); // returns 

                        $reviewsCount = $summaryData->getReviewsCount();

                        else{ ?> <div id="customer-reviews" class="box-collateral box-reviews">
            <p class="no-rating"><a href="<?php echo $this->getStoreUrl()."/review/product/list/id/".$_product->getId()."/#review-form";?>">Write a Review</a></p>
    </div><?php }
                <?php echo $this->getReviewsSummaryHtml($_product, 'default', false)?>

  • Go to 'system > configuration > advanced' in admin and enable Mage_Review Jan 20 '16 at 12:49
  • It is already enabled
    – Ramya
    Jan 20 '16 at 12:51
  • Can you tell me where this error coming? which url you accesing? Jan 20 '16 at 12:52
  • Kindly check the question edited.
    – Ramya
    Jan 20 '16 at 13:02
  • Check if including "index.php" in URL resolves the issue. Generally, it happens when Web Server Rewrites in not enabled.
    – Prateek
    Jan 20 '16 at 13:18

I just replaced the getStoreUrl() method in the above mentioned code with getUrl() and it worked.

Your Answer

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

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