Enhanced Product Reviews Plugin for Medusa with advanced filtering, pagination and admin UI
An enhanced plugin that adds comprehensive product review and moderation capabilities to your Medusa application, with advanced filtering, pagination, and admin UI integration.
Enhanced version with improved admin UI, filtering capabilities, and better integration with Medusa v2.
See a demo in our Medusa Starter
yarn add @lambdacurry/medusa-product-reviews# or, if you're using yarn workspacesyarn workspace my-app add @lambdacurry/medusa-product-reviews
module.exports = defineConfig({plugins: [{resolve: '@lambdacurry/medusa-product-reviews',options: {defaultReviewStatus: 'pending', // OPTIONAL, default is 'approved'},},],});
yarn medusa db:migrate
The plugin provides a built-in SDK for both store and admin operations using Medusa's native HTTP client.
// List product reviewsconst { reviews, count } = await sdk.store.productReviews.list(query: StoreListProductReviewsQuery,headers?: ClientHeaders);// Create/Update a reviewconst review = await sdk.store.productReviews.upsert(data: StoreUpsertProductReviewsDTO,headers?: ClientHeaders);// Get review statisticsconst stats = await sdk.store.productReviews.listStats(query: StoreListProductReviewStatsQuery,headers?: ClientHeaders);
// List reviewsconst { reviews, count } = await sdk.admin.productReviews.list(query: AdminListProductReviewsQuery);// Update review statusconst review = await sdk.admin.productReviews.updateStatus(productReviewId: string,status: 'pending' | 'approved' | 'flagged');// Manage review responsesconst review = await sdk.admin.productReviews.createResponse(productReviewId: string,data: AdminCreateProductReviewResponseDTO);await sdk.admin.productReviews.updateResponse(productReviewId: string,data: AdminUpdateProductReviewResponseDTO);await sdk.admin.productReviews.deleteResponse(productReviewId: string);
Creation: Reviews are set to:
Moderation: Admins can:
IMPORTANT: A running PostgreSQL instance is required. The plugin expects and environment variables to be set. If not provided, both default to "postgres".
Available scripts:
# Build the pluginyarn build# Development mode with hot-reloadyarn dev# Publish to local registry for testingyarn dev:publish# Generate database migrationsyarn db:generate
After publishing the plugin locally by running yarn dev:publish, go to the root of your Medusa project and run the following commands:
cd path/to/your/medusa-applicationyarn medusa plugin:add @lambdacurry/medusa-product-reviews# If you are yarn with a monorepo, you may also need to runyarn install
This plugin is compatible with versions of .
MIT License