Discounts Plugin
Advanced discount management plugin for Medusa v2 with comprehensive discount rules and export capabilities
Overview
The @devx-commerce/plugin-discounts provides advanced discount management capabilities for Medusa v2 commerce platforms. This plugin extends Medusa’s native discount functionality with additional features for managing complex discount rules and promotional campaigns.
System Requirements
Before installing the plugin, ensure your system meets the following requirements:
- Medusa server: v2.x
- Node.js: v20 or later
Installation
Install the plugin using your preferred package manager:
# Using npm
npm install @devx-commerce/plugin-discounts
Configuration
Add the plugin to your medusa-config.js file:
module.exports = {
plugins: [
{
resolve: `@devx-commerce/plugin-discounts`,
options: {
// Add your configuration options here
},
},
],
}
Core Dependencies
- @medusajs/framework (2.8.3) - Medusa core framework
- @medusajs/ui (4.0.4) - Admin UI components
- moment (^2.30.1) - Date and time manipulation
- json2csv (^6.0.0-alpha.2) - CSV export functionality
- @mikro-orm/postgresql (6.4.3) - Database ORM
Features
- Advanced Discount Rules - Create complex discount conditions and rules
- Admin UI Integration - Built-in admin interface for discount management
- CSV Export - Export discount data and reports to CSV format
- Date/Time Management - Schedule discounts with precise timing using moment.js
- Database Support - PostgreSQL integration for reliable data storage
Use Cases
This plugin is ideal for:
- Promotional Campaigns - Manage seasonal and special event promotions
- Customer Segmentation - Target specific customer groups with tailored discounts
- Bulk Operations - Import/export discount data for bulk management
- Reporting - Generate discount performance reports