@kvytech/medusa-plugin-product-reviews
v0.0.8
Published
Medusa plugin management for product reviews
Downloads
5
Readme
Features
- Support API in Storefront to create a product review (content, stars rating, upload photos / videos)
- Support API in Storefront to show reviews of a product
- Support API in Admin to approve a review
- Support API in Admin to delete a review
Prerequisites
How to Install
- Run the following command in the directory of the Medusa backend:
npm install @kvytech/medusa-plugin-product-reviews
- In medusa-config.js add the following at the end of the plugins array:
const plugins = [
// ... other plugins
`@kvytech/medusa-plugin-product-reviews`,
]
Notice
This plugin only supplies necessary APIs to manage product reviews. You will need to create all the UIs in Storefront and Admin and integrate them with the APIs to make it suite your need.
Swagger Docs
Once plugin is installed, you can navigate to the following URL to see the Swagger docs, just replace baseURL
with the domain of your application
URL: ${baseURL}/medusa-plugin-product-reviews/docs
Test the Plugin
- Run the following command in the directory of the Medusa backend to run the backend:
npm run start
Perform checkout and complete an order. Then go to past orders to create product reviews on an order
Check the order in the Admin Panel, it should show the submitted reviews and you can approve
After review is approved, go back to the product detail page in Storefront to check if the product review is there
Demo
Create a review
Review approved
Display review