Ability to submit multiple reviews per product same user

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
lbrewerandassoc
Ensign (ENS)
Ensign (ENS)
Posts: 13
Joined: Wed May 27, 2009 4:17 pm

Ability to submit multiple reviews per product same user

Post by lbrewerandassoc » Sat May 30, 2009 5:35 am

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?

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Ability to submit multiple reviews per product same user

Post by mazhar » Sat May 30, 2009 6:01 am

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.

lbrewerandassoc
Ensign (ENS)
Ensign (ENS)
Posts: 13
Joined: Wed May 27, 2009 4:17 pm

Re: Ability to submit multiple reviews per product same user

Post by lbrewerandassoc » Sat May 30, 2009 7:47 am

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.


Post Reply