spree-contrib/spree_reviews

Feature: Allow user to create only 1 review of a product

johanb opened this issue · 13 comments

While working on this extension I realized a user can post an unlimited amount of reviews for a certain product. Should a user be allowed to do this ?

In my opinion a single review should suffice. A consequence of this is probably that we should also allow users to change their reviews (and have them re-approved). What do you think ?

I'm willing to do a pull-request which implements this feature but am first trying to gather some feedback wether or not other people think this is desired behavior.

+1 personally I'd also prefer users to be limited to 1 review that they could edit.

+1, but what if a user buys the same item again later? Should the user be able to review the product again then? I think a review does not just cover the experience of that user with the product but also with the service of the shop. So it is possible that a user who bought the same item later made better or worse experience than he made on his first order. Shouldn't the user be allowed to review his experience then?

@cantonic you have a valid point. It's worth considering allow the same amount of reviews as items purchased. But right now you can review the product regardless of wether or not you bought it.

I was actually considering marking reviews of people who actually purchased a product as "verified buyers" or something. But that's a whole different feature.

I think that in case the opinion of a customer changes based on a new experience they can update their review. Maybe we can have the "Write a review" button just link to the edit page instead of a new page for those cases?

@johanb Valid issue, but I would advise to stick to an MVP approach.

The quickest way to execute this would be to add validation to the Review model. You shouldn't even have to write custom validation methods, simply do something like

validates :uniqueness => {:scope => [:user_id, :product_id], :message => "It appears you've already contributed a review for this product!"}

And provide some UI candy for this. Conditionally replace links to write a review (for authenticated users) with an apologetic sounding disclaimer.

@jumph4x Wasn't planning to write any fancy custom approaches. Your model validation is exactly what I had in mind. What exactly do you mean by an "MVP approach" ? just unlimited reviews ?

@johanb Minimum Viable Product. Simply saying what I would do exactly, which is a very quick amendment to current functionality.

In other words, I would avoid letting users do multiple reviews, and I would also avoid any kind of 'Verified Buyer' functionality you mentioned.

I like @jumph4x's approach but I can also see the value in some cases for allowing reviews by non-purchasers (specifically if your product is available for sale outside of your spree store)... if you wanted to do this feature completely, I could see implementing verified buyers, etc, but doing the simple validation, and adding an edit form would also be sufficient.

Alright. Thanks for all the feedback guys.

@GeekOnCoffee @johanb Correct me if I am wrong, but to allow anonymous reviews, the scoped uniqueness validation I provided can be extended with a lambda to further allow unlimited anonymous reviews.

Please cherry-pick to 1-0-stable and 1-1-stable when\if done :)

@jumph4x will do

@johanb was this going to ever be merged in?

A user/customer should leave a review if they've already purchased the item already. Is this so?