0

I have 'Write a review' link in my product details page.It was working fine in magento 1.9.0.1. Now when I migrated my code to fresh magento 1.9.2.2 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">
            <?php 
                        $summaryData = Mage::getModel('review/review_summary')->setStoreId($storeId)->load($_product->getId()); // returns 

                        $reviewsCount = $summaryData->getReviewsCount();
                        if($reviewsCount){

                            }
                        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)?>

            </div>
7
  • 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
1

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.