owldesign / QARR

Grow your business by allowing visitors to leave reviews or ask a questions.
https://qarr.tools
Other
6 stars 5 forks source link

[Feature Request] Verified Purchase #22

Open 23d1 opened 5 years ago

23d1 commented 5 years ago

Not sure if it's worth it, but perhaps by checking the email associated with a submission against past orders emails could flip a switch. Or, is it possible to have a hidden field in a Display to incorporate this as a switch in the backend (for manual verification)?

owldesign commented 5 years ago

@23d1 I think I can check submission email against commerce orders and check if product being reviewed is in that order. And you just want some type of indication for each review/question submission that shows whether there is a match?

23d1 commented 5 years ago

Actually, the more I think about it, it would be sufficient to just be able to have extra fields in the backend on submission, like Displays. I haven't gotten around to test yet, but does that work currently, setting up a Display, then having field included that are not rendered in the client templates?

owldesign commented 5 years ago

Currently all fields within Displays will render on the front end form

23d1 commented 5 years ago

Even with custom form template? There one should be able to keep it out or hide it, right?

owldesign commented 5 years ago

Yeah you're right, you can add a hidden field to custom forms (https://docs.qarr.tools/custom/reviews/#reviews). But how are you thinking about it? Did you want to hit some function that checks if verified customer? And after submittion this hidden field needs to show up in your entry submisison page?

23d1 commented 5 years ago

Well, at first I thought it might be good to have something in QARR that checks if the user posting a review or question on a product has supplied an email for their post that is found on an order, and checking against the lineitems on the order if they have at some point purchased the product they are reviewing/asking a question about. With the ability to also call this out in client facing templates as a simple true/false.

Other than that, the simpler way would be to just have a field that's available as a lightswitch or something on the entry in the submissions through the admin (guessing this can be achieved with Displays right now, which is good).

owldesign commented 5 years ago

So I might have already thought about this direction but never implemented. I have a column called hasPurchased in db for reviews and questions.

We can programatically check for that after submission or I guess technically if you add a field to Display (checkbox) with name="fields[hasPurchased] so users can check if they purchased product before, but then yeah you'd have to manually verify if true.

23d1 commented 5 years ago

Oh, awesome. Yeah—if there's an automated approach, that's definitely preferred. If sales volumes are high then it could get crazy pretty quick to do it manually. :)

owldesign commented 5 years ago

Already done! I'm making other updates to the plugin, so you'll have it on the next push.

It'll look like this. There will also be reference to the order and date purchased.

image

23d1 commented 5 years ago

Right on! Quick question; what happens when there are multiple orders? Would it simply limit to the latest one (makes most sense I think, first or last).

owldesign commented 5 years ago

Right now all im doing is just getting .one() result. So whatever Craft thinks .one() on an element query is (the most recent?) that's what is being returned.

I can also set it to .all() and get all orders this customer had with this product.

Everything is in place so whatever the use case makes more sense I'm fine with it.

23d1 commented 5 years ago

Gotcha. I think .one() is fine, I'm a big fan of keeping it simple. There would probably be completely other use cases in terms of email marketing and things, but that's outside of this plugins' scope, no doubt, as the intent is to get people who ordered to review, which is then verified against actual orders.

owldesign commented 5 years ago

Ok.

I’m also working on Campaign functionality for the plugin. So if you got ideas/suggestions for email marking portion that’ll be awesome help. Being able to mass email people who’ve purchased a product to review will probably be my starting point.

23d1 commented 5 years ago

Awesome! One thing that would be great is the ability to time emails like say after 14 or 21 days send email to request rating/review for the items in the order. The link could then either be the product page, or if one has a custom page set up that just houses the form for posting rating/review for each specific product (seems like the least amount of steps, not having to locate the review functionality on the product page). Not sure if timing would require a cron job, but if so, would be good to be able to use an external cron service to simply hit a URL with a "secret" hash or something like that like https://url.com/qarr?W34RfgfggeiuUg if that makes sense? :)