Files
medusa-store/packages/modules/promotion
Riqwan Thamir ca038ff583 feat(promotion): Allow buyget promotion to apply multiple times on cart (#13305)
what:

Introduces 2 new features to promotion module:

1. Introduce max quantity limit to promotion application - This will limit the application of the promotion based on the quantity of the target products in the cart. 
2. When applying buy get promotions, we will now apply buyget promotion until eligible items are exhausted or max quantity is reached. 

```
- Buy 2 t-shirts, Get 1 sweater
- Max quantity -> 1

This means you can add two t-shirts, and get 1 sweaters for free. However, if you add four t-shirts, you only get one sweater for free.
```

```
- Buy 2 t-shirts, Get 1 sweater
- Max quantity -> 3

This means you can add six t-shirts, and get three sweaters for free. However, if you add eight t-shirts, you only get three sweaters for free
```

```
- Buy 4 t-shirts, Get 2 sweater
- Max quantity -> 1

This should throw on creation, as the max quantity should as a minimum be the same value as the target rule quantity
```

RESOLVES SUP-2357 / https://github.com/medusajs/medusa/issues/13265
2025-08-31 13:35:36 +00:00
..
2025-08-28 22:58:13 +02:00

Promotion Module

The PromotionModule is Medusas promotion engine. It offers functionality to discount carts through coupon codes with a given set of rules governing when and how the code should be applied.