A powerful wishlist management plugin for Medusa commerce
This plugin provides wishlist functionality for your Medusa-powered e-commerce store. It enables customers to maintain a single wishlist per user account, helping them keep track of products they're interested in purchasing later.
- Single Wishlist per User: Each user gets one dedicated wishlist
-
RESTful APIs:
-
Add Item
: Add product to the wishlist -
Remove Item
: Remove product from the wishlist -
Clear Wishlist
: Remove all product from the wishlist -
Get Wishlist
: Retrieve the current wishlist products
-
We're planning to add the following notification features to enhance the wishlist experience:
- Stock Notifications: Alert users when wishlist items are back in stock
- Inventory Alerts: Notify users when wishlist items are running low
- Price Drop Alerts: Inform users when items in their wishlist decrease in price
These upcoming features will help users make informed decisions and never miss out on their desired products.
- Medusa Application Version >= 2.4.0
- In your Medusa application, run the following command to install the wishlist plugin:
yarn add @devx-commerce/wishlist # or npm install @devx-commerce/wishlist
- Add the plugin to the
plugins
array inmedusa-config.ts
:
module.exports = defineConfig({
// ...
plugins: [
{
resolve: "@devx-commerce/wishlist",
options: {}
}
]
})
- Run the
db:migrate
command to run migrations and sync links:
npx medusa db:migrate
You can also copy the source files into an existing Medusa application, which will add them not as a plugin, but as standard Medusa customizations.
- Copy the content of the following directories:
src/api/store
src/api/middlewares.ts
src/link
src/modules/wishlist
- Add the Wishlist Module to
medusa-config.ts
:
module.exports = defineConfig({
// ...
modules: [
{
resolve: "./src/modules/wishlist"
},
]
})
- Run the
db:migrate
command to run migrations and sync links:
npx medusa db:migrate
To test out that the plugin is working, you can go to any product page on the Medusa Admin and see a Wishlist section at the top of the page. You can also try importing the OpenAPI Spec file and using the API routes added by this plugin.
- Medusa Documentatin
- OpenAPI Spec file: Can be imported into tools like Postman to view and send requests to this project's API routes.