Package.json file
{
"license": "MIT",
"keywords": [
"sqlite",
"postgres",
"typescript",
"ecommerce",
"headless",
"medusa"
],
"scripts": {
"build": "medusa build",
"seed": "medusa exec ./src/scripts/seed.ts",
"start": "redis-server /opt/homebrew/etc/redis.conf --daemonize yes && medusa start",
"dev": "redis-server /opt/homebrew/etc/redis.conf --daemonize yes && medusa develop; redis-cli shutdown"
},
"dependencies": {
"@google-cloud/storage": "^7.15.1",
"@imgproxy/imgproxy-node": "^1.1.0",
"@medusajs/admin-sdk": "2.17.2",
"@medusajs/cli": "2.17.2",
"@medusajs/framework": "2.17.2",
"@medusajs/index": "2.17.2",
"@medusajs/medusa": "2.17.2",
"@medusajs/translation": "2.17.2",
"@narisolutions/medusa-plugin-pos": "^0.1.2",
"@react-email/components": "0.0.33",
"@reorderjs/reorder": "^1.0.8",
"@sentry/cli": "^2.43.0",
"@sentry/node": "^9.11.0",
"@sentry/profiling-node": "^9.11.0",
"@uiw/react-json-view": "^2.0.0-alpha.17",
"add": "^2.0.6",
"bwip-js": "^4.6.0",
"cors": "^2.8.5",
"cron-parser": "^5.5.0",
"dayjs": "^1.11.18",
"exceljs": "^4.4.0",
"i18n-js": "^4.5.1",
"juice": "11.1.1",
"jwt-decode": "^4.0.0",
"mime-types": "^2.1.35",
"posthog-node": "^5.21.1",
"qrcode": "^1.5.4",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-is": "^18.3.1",
"tsconfig-paths": "^4.2.0",
"yarn": "^1.22.22",
"zod": "4.2.0",
"zustand": "^5.0.5"
},
"devDependencies": {
"@swc/core": "1.5.7",
"@types/cors": "^2.8.17",
"@types/mime-types": "^2.1.4",
"@types/node": "^20.0.0",
"@types/qrcode": "^1.5.5",
"@types/react": "^18.3.2",
"@types/react-dom": "^18.2.25",
"prettier": "^3.6.2",
"prop-types": "^15.8.1",
"react-email": "3.0.7",
"ts-node": "^10.9.2",
"typescript": "^5.6.2",
"vite": "^5.2.11"
},
"engines": {
"node": ">=24"
}
}
Node.js version
v24
Database and its version
PostgreSQL 17
Operating system name and version
macOS 26.3
Browser name
No response
What happended?
Price list min_quantity tiered price not applied to cart line item when an override base price exists
Summary
I have a price list of type override with a customer group rule. The base override price is applied to the cart line item correctly, but the conditional (quantity-based) price with min_quantity is never applied, even when the cart line item quantity is well above the minimum.
Is this supposed to work for price lists, or am I misconfiguring something? The pricing docs say tiered pricing is chosen from the cart's item quantity, but I can't get the min_quantity tier to apply inside a price list.
Environment
- Medusa version: v2.17.2+
- Reproduced via the standard store cart flow (create cart → add line item as an authenticated customer in the target group).
Price list configuration
{
"id": "plist_01KX0MCHXVFXJMTXD4YW1AZRAV",
"type": "override",
"status": "active",
"starts_at": null,
"ends_at": null,
"rules": {
"customer.groups.id": ["cusgroup_01KWKP4NJK53B4WANH06ZD0EXN"]
}
}
Price entries
For variant variant_01JV83C575WPDQV2B62RX7Q4A2, currency gel:
| Price |
min_quantity |
Result in cart |
| 2.00 GEL |
null |
Applied correctly ✅ |
| 1.50 GEL |
5 |
Never applied ❌ |
Steps to reproduce
- Create a price list of type
override with rule customer.groups.id = [<group>], status active.
- Add two prices for the same variant + currency:
2.00 with no min_quantity
1.50 with min_quantity: 5
- As a customer belonging to that group, add the variant to a cart in the matching region/currency.
- Set the line item quantity to
8 (≥ 5).
- Inspect the cart line item's
unit_price.
Cart context
- Cart item quantity: 8 (≥ 5)
- Customer belongs to group:
cusgroup_01KWKP4NJK53B4WANH06ZD0EXN
- Currency: GEL
- Region:
reg_01JV83BKV3MXZ0VW0P0DRB0HS5 (Georgia)
Expected behavior
When the cart line item quantity is ≥ 5, the resolved unit_price should be 1.50 GEL (the min_quantity: 5 tier).
Actual behavior
The line item unit_price stays at 2.00 GEL regardless of quantity. The min_quantity: 5 tier is never selected; only the price with no quantity condition is applied.
What I observed while debugging
The base override (no min_quantity) resolves fine, so the price list, group rule, region, and currency all match correctly — the customer-group context is clearly reaching the cart. The only thing that doesn't work is selecting the min_quantity tier from the cart's line item quantity.
The store/cart pricing context type (MedusaPricingContext in @medusajs/types) has no quantity field:
export type MedusaPricingContext = {
region_id?: string;
currency_code?: string;
customer_id?: string;
customer?: { groups?: { id: string }[] };
// no `quantity`
};
whereas the low-level pricingModuleService.calculatePrices(filters, context) does accept a quantity in its context (per the docs example: context: { currency_code, min_quantity: 4 }). So from the outside it looks like the cart resolves price-list prices without ever passing the line item quantity, which would explain why only the no-quantity price can be selected.
This looks related to (possibly the same root cause as):
Question
Is applying a min_quantity tier inside a price list to a cart line item supported in v2? If yes, what am I missing in the configuration? If it's a known limitation, is the recommended approach to use a promotion with a quantity condition instead?
Expected behavior
When the cart line item quantity is ≥ 5, the resolved unit_price should be 1.50 GEL (the min_quantity: 5 tier).
Actual behavior
The line item unit_price stays at 2.00 GEL regardless of quantity. The min_quantity: 5 tier is never selected; only the price with no quantity condition is applied.
Link to reproduction repo
n/a
Package.json file
{ "license": "MIT", "keywords": [ "sqlite", "postgres", "typescript", "ecommerce", "headless", "medusa" ], "scripts": { "build": "medusa build", "seed": "medusa exec ./src/scripts/seed.ts", "start": "redis-server /opt/homebrew/etc/redis.conf --daemonize yes && medusa start", "dev": "redis-server /opt/homebrew/etc/redis.conf --daemonize yes && medusa develop; redis-cli shutdown" }, "dependencies": { "@google-cloud/storage": "^7.15.1", "@imgproxy/imgproxy-node": "^1.1.0", "@medusajs/admin-sdk": "2.17.2", "@medusajs/cli": "2.17.2", "@medusajs/framework": "2.17.2", "@medusajs/index": "2.17.2", "@medusajs/medusa": "2.17.2", "@medusajs/translation": "2.17.2", "@narisolutions/medusa-plugin-pos": "^0.1.2", "@react-email/components": "0.0.33", "@reorderjs/reorder": "^1.0.8", "@sentry/cli": "^2.43.0", "@sentry/node": "^9.11.0", "@sentry/profiling-node": "^9.11.0", "@uiw/react-json-view": "^2.0.0-alpha.17", "add": "^2.0.6", "bwip-js": "^4.6.0", "cors": "^2.8.5", "cron-parser": "^5.5.0", "dayjs": "^1.11.18", "exceljs": "^4.4.0", "i18n-js": "^4.5.1", "juice": "11.1.1", "jwt-decode": "^4.0.0", "mime-types": "^2.1.35", "posthog-node": "^5.21.1", "qrcode": "^1.5.4", "react": "18.3.1", "react-dom": "18.3.1", "react-is": "^18.3.1", "tsconfig-paths": "^4.2.0", "yarn": "^1.22.22", "zod": "4.2.0", "zustand": "^5.0.5" }, "devDependencies": { "@swc/core": "1.5.7", "@types/cors": "^2.8.17", "@types/mime-types": "^2.1.4", "@types/node": "^20.0.0", "@types/qrcode": "^1.5.5", "@types/react": "^18.3.2", "@types/react-dom": "^18.2.25", "prettier": "^3.6.2", "prop-types": "^15.8.1", "react-email": "3.0.7", "ts-node": "^10.9.2", "typescript": "^5.6.2", "vite": "^5.2.11" }, "engines": { "node": ">=24" } }Node.js version
v24
Database and its version
PostgreSQL 17
Operating system name and version
macOS 26.3
Browser name
No response
What happended?
Price list
min_quantitytiered price not applied to cart line item when an override base price existsSummary
I have a price list of type
overridewith a customer group rule. The base override price is applied to the cart line item correctly, but the conditional (quantity-based) price withmin_quantityis never applied, even when the cart line item quantity is well above the minimum.Is this supposed to work for price lists, or am I misconfiguring something? The pricing docs say tiered pricing is chosen from the cart's item quantity, but I can't get the
min_quantitytier to apply inside a price list.Environment
Price list configuration
{ "id": "plist_01KX0MCHXVFXJMTXD4YW1AZRAV", "type": "override", "status": "active", "starts_at": null, "ends_at": null, "rules": { "customer.groups.id": ["cusgroup_01KWKP4NJK53B4WANH06ZD0EXN"] } }Price entries
For variant
variant_01JV83C575WPDQV2B62RX7Q4A2, currencygel:min_quantitynull5Steps to reproduce
overridewith rulecustomer.groups.id = [<group>], statusactive.2.00with nomin_quantity1.50withmin_quantity: 58(≥ 5).unit_price.Cart context
cusgroup_01KWKP4NJK53B4WANH06ZD0EXNreg_01JV83BKV3MXZ0VW0P0DRB0HS5(Georgia)Expected behavior
When the cart line item quantity is ≥ 5, the resolved
unit_priceshould be 1.50 GEL (themin_quantity: 5tier).Actual behavior
The line item
unit_pricestays at 2.00 GEL regardless of quantity. Themin_quantity: 5tier is never selected; only the price with no quantity condition is applied.What I observed while debugging
The base override (no
min_quantity) resolves fine, so the price list, group rule, region, and currency all match correctly — the customer-group context is clearly reaching the cart. The only thing that doesn't work is selecting themin_quantitytier from the cart's line item quantity.The store/cart pricing context type (
MedusaPricingContextin@medusajs/types) has no quantity field:whereas the low-level
pricingModuleService.calculatePrices(filters, context)does accept a quantity in its context (per the docs example:context: { currency_code, min_quantity: 4 }). So from the outside it looks like the cart resolves price-list prices without ever passing the line item quantity, which would explain why only the no-quantity price can be selected.This looks related to (possibly the same root cause as):
price_unitdoes not reflect PriceSet's price rule (closed as "not planned")Question
Is applying a
min_quantitytier inside a price list to a cart line item supported in v2? If yes, what am I missing in the configuration? If it's a known limitation, is the recommended approach to use a promotion with a quantity condition instead?Expected behavior
When the cart line item quantity is ≥ 5, the resolved
unit_priceshould be 1.50 GEL (themin_quantity: 5tier).Actual behavior
The line item
unit_pricestays at 2.00 GEL regardless of quantity. Themin_quantity: 5tier is never selected; only the price with no quantity condition is applied.Link to reproduction repo
n/a