@devx-commerce/plugin-wishlist

1.0.0 • Public • Published

Medusa logo

Medusa Plugin - Wishlist

A powerful wishlist management plugin for Medusa commerce

PRs welcome! Product Hunt Discord Chat Follow @medusajs

What is Medusa Wishlist Plugin

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.

Features

Core Functionality

  • Single Wishlist per User: Each user gets one dedicated wishlist
  • RESTful APIs:
    1. Add Item: Add product to the wishlist
    2. Remove Item: Remove product from the wishlist
    3. Clear Wishlist: Remove all product from the wishlist
    4. Get Wishlist: Retrieve the current wishlist products

Future Enhancements

We're planning to add the following notification features to enhance the wishlist experience:

  1. Stock Notifications: Alert users when wishlist items are back in stock
  2. Inventory Alerts: Notify users when wishlist items are running low
  3. 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.

Prerequisites

  • Medusa Application Version >= 2.4.0

Installation

  1. In your Medusa application, run the following command to install the wishlist plugin:
yarn add @devx-commerce/wishlist # or npm install @devx-commerce/wishlist
  1. Add the plugin to the plugins array in medusa-config.ts:
module.exports = defineConfig({
  // ...
  plugins: [
    {
      resolve: "@devx-commerce/wishlist",
      options: {}
    }
  ]
})
  1. Run the db:migrate command to run migrations and sync links:
npx medusa db:migrate

Copy into your existing medusa application

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.

  1. Copy the content of the following directories:
  • src/api/store
  • src/api/middlewares.ts
  • src/link
  • src/modules/wishlist
  1. Add the Wishlist Module to medusa-config.ts:
module.exports = defineConfig({
  // ...
  modules: [
    {
      resolve: "./src/modules/wishlist"
    },
  ]
})
  1. Run the db:migrate command to run migrations and sync links:
npx medusa db:migrate

Test it Out

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.

More Resources

Package Sidebar

Install

npm i @devx-commerce/plugin-wishlist

Weekly Downloads

49

Version

1.0.0

License

MIT

Unpacked Size

57.7 kB

Total Files

28

Last publish

Collaborators

  • brijeshagarwal
  • vasuchapadia
  • brijesh_at_devx
  • chirag12345