umbraco / Umbraco.Commerce.Issues

18 stars 2 forks source link

Product reviews #151

Closed bjarnef closed 3 years ago

bjarnef commented 4 years ago

It would be great to support product reviews in Vendr. However since not all sites/stores need this feature and some might implement their own solution or use a third party system, it would be great to have this as a separate add-on, e.g. Vendr.ProductReviews, similar to Vendr.WishList https://github.com/vendrhub/vendr/issues/94

Some inspiration from Shopify: https://apps.shopify.com/product-reviews and nopCommerce https://docs.nopcommerce.com/en/running-your-store/catalog/products/product-reviews.html

Features

bjarnef commented 4 years ago

Some inspiration of how the DB schema can be structured:

https://blog.magepsycho.com/import-product-reviews-in-magento-via-sql/

https://solutioncenter.apexsql.com/sql-code-refactoring-ways-to-improve-database-design/

http://marekblotny.blogspot.com/2009/02/fluent-nhbernate-and-collections.html?m=1

bjarnef commented 4 years ago

@mattbrailsford maybe you have some initial thoughts on the DB structure?

As minimum I think we need:

bjarnef commented 4 years ago

Regarding the API we could have a ReviewService or similar, e.g. IReviewService to inject into the controller and a few different methods.

Some inspiration: https://csharp.hotexamples.com/examples/-/ReviewService/-/php-reviewservice-class-examples.html

GetProductReview(string productReference)
GetProductReviews(string customerReference)
AddProductReview(string productReference, string customerReference, decimal rating, string name, string description)

AddProductReview could alternatively be named CreateProductReview.

The reason for having rating/score as decimal is that some might want allow half-star rating.

bjarnef commented 4 years ago

Some inspiration for review form on product page: https://ecommerce.aheadworks.com/magento-2-extensions/advanced-reviews

http://magento2ar.demo2.aheadworks.com/travel-laptop-backpack.html

image

There a lot of configurations for this, but for Vendr we could keep it simple, but maybe with a few configurations in Vendr settings?

image

Furthermore there is a dashboard with paged reviews. This could be useful and maybe a few filter options.

image

Furthermore there's a few bulk actions, e.g. to delete review(s) or change status of these.

image

Finally you can also click each review to edit this. In general you should modify reviews from customers, but it could contains words or similar you would need to remove to approve the review.

image

bjarnef commented 4 years ago

As star rating it would be great with a basic vanilla JS code (eventually a plugin). The star rating in backoffice could be readonly font/svg icons.

With SVG the same icons could probably be used as well in frontend (but developers can replace this with their own icons or plugin if they want).

It could include a example partial which could be used as a foundation.

A simple example with css, svg and vanilla JS: https://zellwk.com/blog/star-rating/

bjarnef commented 3 years ago

@mattbrailsford I guess we can close this for now and open separate issues on https://github.com/vendrcontrib/vendr-reviews/issues for future development πŸ˜πŸ˜ŽπŸ‘