Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
johanb opened this issue Jul 13, 2012 · 13 comments
Open

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

johanb opened this issue Jul 13, 2012 · 13 comments

Comments

@johanb
Copy link
Contributor

johanb commented Jul 13, 2012

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.

@JDutil
Copy link
Member

JDutil commented Jul 13, 2012

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

@cantonic
Copy link

+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?

@johanb
Copy link
Contributor Author

johanb commented Jul 16, 2012

@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?

@jumph4x
Copy link
Contributor

jumph4x commented Jul 16, 2012

@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.

@johanb
Copy link
Contributor Author

johanb commented Jul 16, 2012

@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 ?

@jumph4x
Copy link
Contributor

jumph4x commented Jul 16, 2012

@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.

@GeekOnCoffee
Copy link
Contributor

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.

@johanb
Copy link
Contributor Author

johanb commented Jul 16, 2012

Alright. Thanks for all the feedback guys.

@jumph4x
Copy link
Contributor

jumph4x commented Jul 16, 2012

@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.

@jumph4x
Copy link
Contributor

jumph4x commented Jul 16, 2012

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

@johanb
Copy link
Contributor Author

johanb commented Jul 16, 2012

@jumph4x will do

@ghost
Copy link

ghost commented May 15, 2014

@johanb was this going to ever be merged in?

@SylarRuby
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants