Page 1 of 1
Ability to submit multiple reviews per product same user
Posted: Sat May 30, 2009 5:35 am
by lbrewerandassoc
If are logged in as a Registered User and attempt to submit a Review on a product for which you have already submitted a review, the ProductReviewsPanel is written so that the user's former review is selected for updating.
I want to allow registered customers to submit multiple (new) reviews for the same product. That is, I want a new Insert Form to show up each time a user clicks to submit a new Review. Is there an easy way to do this?
Re: Ability to submit multiple reviews per product same user
Posted: Sat May 30, 2009 6:01 am
by mazhar
Edit you ConLib/ProductReviewForm.ascx.cs file and locate following code
Code: Select all
//CHECK FOR EXISTING REVIEW
if(_ProductReview == null) _ProductReview = ProductReviewDataSource.LoadForProductAndReviewerProfile(_ProductId, profile.ReviewerProfileId);
and change it as below
Code: Select all
//CHECK FOR EXISTING REVIEW
//if(_ProductReview == null) _ProductReview = ProductReviewDataSource.LoadForProductAndReviewerProfile(_ProductId, profile.ReviewerProfileId);
Now locate
Code: Select all
//EITHER LOAD THE EXISTING REVIEW OR CREATE NEW
if (_ProductReview == null) _ProductReview = ProductReviewDataSource.LoadForProductAndReviewerProfile(_ProductId, _Profile.ReviewerProfileId);
and change it as below
Code: Select all
//EITHER LOAD THE EXISTING REVIEW OR CREATE NEW
//if (_ProductReview == null) _ProductReview = ProductReviewDataSource.LoadForProductAndReviewerProfile(_ProductId, _Profile.ReviewerProfileId);
Hopefully it will workout.
Re: Ability to submit multiple reviews per product same user
Posted: Sat May 30, 2009 7:47 am
by lbrewerandassoc
Thanks.
I found a 3rd instance of the ProductReviewDataSource.LoadForProductAndReviewerProfile call w/in the ProductReviewForm.ascx.cs page (line 225) and commented it out also.
It seems to be working great. thanks.
Re: Ability to submit multiple reviews per product same user
Posted: Sat May 30, 2009 7:53 am
by mazhar
sounds good