Add minimum purchase condition for automatic promotions (with optional auto-add product) #14788
aroard
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to propose an enhancement to the promotion system by introducing a minimum purchase requirement for automatic promotions.
Currently, automatic promotions can apply directly without a minimum cart threshold. The proposed feature would allow store owners to define a minimum purchase amount that must be reached before the promotion is activated.
⸻
Use Case
Example:
• Promotion: Free Product X
• Condition: Minimum cart total of 100€
• Behavior:
• If cart total < 100€ → promotion does not apply
• If cart total ≥ 100€ → promotion automatically activates
Additionally:
If the promotion grants a specific product, the product would be automatically added to the cart when the minimum purchase is reached.
This ensures:
• Clear UX
• Fully automatic promotional flow
• No manual coupon entry required
⸻
Extended Behavior
This logic would apply to:
• Automatic free product promotions
• Automatic percentage or fixed discounts (only activated once the minimum purchase is reached)
⸻
Proposed Implementation Idea
High-level idea:
• Extend the promotion configuration with:
• minimum_purchase_amount
• Validate threshold during cart total calculation
• If condition is met:
• Apply discount
• Or automatically insert the promotional product into the cart
The promotion would deactivate automatically if the cart total drops below the threshold.
⸻
Real-World Implementation
I have implemented this logic in my own Medusa backend and it works very well in production.
When a customer adds items to the cart:
• If the minimum purchase is reached, the promotion applies automatically.
• If the promotion is product-based, the product is automatically inserted.
• If the cart drops below the threshold, the promotion is removed.
This has been extremely practical from a business and UX perspective.
⸻
Question
Would this be something aligned with Medusa’s promotion roadmap?
If useful, I can:
• Share implementation details
• Open a draft PR
• Refactor my implementation to match core architecture standards
Regarding sharing a live commercial site for testing: I’m not sure if that’s appropriate, but I could instead provide:
• A short demo video
• A minimal reproduction example
• Or a test branch
I’d be happy to contribute this feature properly to the core if there is interest.
Beta Was this translation helpful? Give feedback.
All reactions