4

is there a way of disabling Product Review but retain Product rating?

I already disabled the Product Review in the backend but in the frontend the ratings will not be displayed.

I would like to get rid of the review but the ratings will remain by asking the user to login first before they can rate, then after login they can give a 1-5 star for the rating to the Product. Is this achievable? Any insights? solutions? Thanks

1

It seems that when you disable Mage_Review then Mage_Rating also gets disabled.

You can manually remove the review form by editing the following template file:

app/design/frontend/YOUR_PACKAGE/YOUR_THEME/template/review/form.phtml

The review form is submitted to postAction() of class Mage_Review_ProductController (app/code/core/Mage/Review/controllers/ProductController.php).


In postAction() function, you will see this code:

$validate = $review->validate();

You can set $validate to true:

$validate = true;

Or, edit the validate() function in class Mage_Review_Model_Review (app/code/core/Mage/Review/Model/Review.php).

  • Yes I tried editing but when I tried clicking the submit, it won't proceed because of the validation. Is this where I edit the validation? app/code/core/Mage/Review/controllers/ProductController.php – KiD Cajes Mar 22 '16 at 6:00
  • Yes, you have to edit the validation over there. You may rewrite Mage_Review_ProductController with your custom module or just make a local copy at app/code/local/Mage/Review/controllers/ProductController.php and edit in the local copy. – Mukesh Chapagain Mar 22 '16 at 9:33
  • Hi Mukesh, I tried but I can't pin down which one to edit for the validation. Can you guide me exactly which one? If it's ok? – KiD Cajes Mar 23 '16 at 7:09
  • And also where do I get to edit the text "Be the first to Review this product"? – KiD Cajes Mar 23 '16 at 7:18
  • @KiDCajes : I have update the answer. Please check. – Mukesh Chapagain Mar 23 '16 at 7:26

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.