main
@medusajs/promotion
2.21.2
Patch Changes
#16954
3718c46fa637e6556461fd50703425ee2cd33bfdThanks @DylanCuure! - fix(promotion): correlate the automatic promotion prefilter with the candidate promotions, so its cost no longer grows with the total number of promotionsUpdated dependencies []:
- @medusajs/framework@2.21.2
2.21.1
Patch Changes
- Updated dependencies [
c000d377f1a90d14bcda41500b1ed5bc2734902e]:- @medusajs/framework@2.21.1
2.21.0
Patch Changes
- #16397
ce19ae663c3edaa6b58bd596a406bcde24d5956fThanks @danlapteacru! - fix(promotion): apply buy-get promotions independently of line item order
A buyget promotion whose target product is also listed in its own buy_rules was applied or not depending purely on the order of line items in the cart, and when it was not applied nothing surfaced — no error, no adjustment, the cart silently stayed at full price.
Two things caused it. sortByPrice in buy-get.ts never returned 0, so for equally priced items it claimed a strict ordering that does not exist and left the result up to the sort implementation. The buy-side selection then greedily reserved the first buy_rules_min_quantity eligible items and subtracted them from the target's available quantity, so whenever the target item was the one reserved, the promotion was dropped even though a valid assignment existed.
The comparators now return 0 for equal prices (also in sort-by-price.ts, where sortLineItemByPriceAscending and sortShippingLineByPriceAscending had the same problem), and the buy side now prefers items that cannot serve as targets before falling back to target-eligible ones. Buy X get X on a single product is unaffected.
- Updated dependencies [
e9d1f84dbfacd35d7787d1af03215a6ae5a176d8,a4c0a845e8b3a7a5acfaacbb0c093cd539ac713b,c8701e77534f7b615c8b86814f8d5789c0104382,df8c278d615229436be5b299ebdc76a576695fc3]:- @medusajs/framework@2.21.0
2.20.1
Patch Changes
- Updated dependencies [
f373c17dd60cb1e7df1d0c70db31d516d2a0cb4f]:- @medusajs/framework@2.20.1
2.20.0
Patch Changes
- Updated dependencies [
847612908fdd1c11a4df09ccc2e8ab44d338bb04,785fd2b8a978201638a4d8d5ae9eea483958c0fb,706ce874672c9cd1d8fc0c5429fc0dd24e6910a9,6a2fce501f3bcd459c21a67f586c7a15b905ff0f,5e06e544a296b9033f20f71f11c559f81a0e5739]:- @medusajs/framework@2.20.0
2.19.0
Patch Changes
- Updated dependencies [
372a1ab8fa4c8415f1eda294e3c4c5d9dbee4a30,5f4d93c374b0ad0b0a31e75de98c7557e0415677,5105fec20908cf7bcd7f5f859674acdd8a38b982]:- @medusajs/framework@2.19.0
2.18.0
Patch Changes
0b678b4c8b3f22d5fa1a63d1cfefd2bb78cdef47- fix(payment,promotion): serialize concurrent money guards to prevent over-capture, over-refund and campaign budget overspendUpdated dependencies [
1621e14330fe64a968510991408ace8fdac84ce9,1359d1bf6237aa058910b805395932cd070d2043,3bf2b51b7e140c3a7f45ad9c9a8a6bd4f470ff09,d76952b5b0e4b287747a7e08f2cb745510143aae,d6b2a87da1dbfd065336c80e41cb7c086dc2a340,6ef16b6fdc6f04b900583a5f2714a863011ed19a,70c122753875f3cca03ff49b8a0ea9fe2c5e1165,144c47aba88f6e08fb7c99634c9fec8474721b0a,513c01a5a7f587cb52c92677e2379e54bd990361]:- @medusajs/framework@2.18.0
2.17.2
Patch Changes
#15683
de58ec503bcd82aae3fe576f9a404c36e2525f4cThanks @Floofy6! - chore: add package bugs metadataUpdated dependencies [
de58ec503bcd82aae3fe576f9a404c36e2525f4c]:- @medusajs/framework@2.17.2
2.17.1
Patch Changes
- Updated dependencies [
975313f62b22055ddaacf7852f33cf7b0f4af5df]:- @medusajs/framework@2.17.1
2.17.0
Patch Changes
- Updated dependencies [
57b8e74d0fea8fb0e9dccd76eb6df06f0380071a]:- @medusajs/framework@2.17.0
2.16.0
Patch Changes
1c5ce279aaf792789be371fae70ca304f710cb73- fix(promotion): prevent negative taxable base when stacking tax-inclusive and non-tax-inclusive promotions
The applied-promotions accumulator stored adjustment amounts in each promotion's own tax base, so a tax-inclusive promotion compared its remaining applicable amount (incl-tax) against amounts a previous non-tax-inclusive promotion recorded excl-tax. The mismatched bases let the combined discount exceed the line item value and drive the taxable base negative. Applied amounts are now tracked tax-exclusively and converted to the promotion's base before being subtracted, for both each and across allocations.
- Updated dependencies [
8a6664d6d445f875f56078fad21fe12a185b9627,20352f4fa2f31e5b491c8b1b244c407392939fbf,90af038c95c835dee5168ffd19cda5182d81b904,66610b87efb112e37b78c7c9536d95070b8d6b11]:- @medusajs/framework@2.16.0
2.15.5
Patch Changes
- Updated dependencies [
8122633a8b33164a6094f5a39896e356efde1747,538f98da78ae2d741f1182e6ef315ba8efac6911]:- @medusajs/framework@2.15.5
2.15.4
Patch Changes
- Updated dependencies []:
- @medusajs/framework@2.15.4
2.15.3
Patch Changes
- Updated dependencies []:
- @medusajs/framework@2.15.3
2.15.2
Patch Changes
- Updated dependencies [
2b21d15640ae459386b0acea4c83804c6f502b9d]:- @medusajs/framework@2.15.2
2.15.1
Patch Changes
- Updated dependencies []:
- @medusajs/framework@2.15.1
2.15.0
Patch Changes
- Updated dependencies []:
- @medusajs/framework@2.15.0
2.14.2
Patch Changes
- Updated dependencies [
be0b8817a1e2e48e1c6c579de6598c6f5e9bf4b0,7c659ff3d69c43bd7477bcc8a1c0afd092ea1c23]:- @medusajs/framework@2.14.2
2.14.1
Patch Changes
- Updated dependencies []:
- @medusajs/framework@2.14.1
2.14.0
Patch Changes
#14939
834553b311aa66b2f2f85131398badb0d6b55b13Thanks @pitzegluck! - fix(promotion): support fixed amount discount type in buy-get promotionsUpdated dependencies [
0929b8d192833e10b6b91795f1ffc478938c3fb7,843dbfe7c8f27b732486c7a8da7b6d63f2fdf967]:- @medusajs/framework@2.14.0
2.13.6
Patch Changes
- Updated dependencies [
2b0cd5ff0ce00bf1de1d99632f1bda4073ac035d]:- @medusajs/framework@2.13.6
2.13.5
Patch Changes
- Updated dependencies []:
- @medusajs/framework@2.13.5
2.13.4
Patch Changes
- Updated dependencies []:
- @medusajs/framework@2.13.4
2.13.3
Patch Changes
- Updated dependencies [
dbaae9630d26a0806751d5614beadef3e0b4bf07]:- @medusajs/framework@2.13.3
2.13.2
Patch Changes
- Updated dependencies [
7aca778ae56069371f5d26a757d3b2276d524776,77d899e135ed75668ca7d7b01a8ed4f0c1fe0ac8]:- @medusajs/framework@2.13.2
2.13.1
Patch Changes
- Updated dependencies []:
- @medusajs/framework@2.13.1
2.13.0
Minor Changes
a31e72c31c5235240cead2d04e39e5927688eec7Thanks @olivermrbl! - chore: Minor bump
Patch Changes
- Updated dependencies [
a31e72c31c5235240cead2d04e39e5927688eec7]:- @medusajs/framework@2.13.0
2.12.6
Patch Changes
- Updated dependencies [
13476988763368b3b333fa5bc3f613e8eb174fdf,8890f284705a4843a57a3800820208f593689a2a,1ca3516a5cbb059ad79fe483cd8e1d6a7ebca23b]:- @medusajs/framework@2.12.6
2.12.5
Patch Changes
- Updated dependencies [
233ec261be200fac83002415aa7c0df082339a3f]:- @medusajs/framework@2.12.5
2.12.4
Patch Changes
- Updated dependencies [
181d5fa67122e4e5f38b91f6b716d35f2d08a204,d347e369ce555064e24f2dc3cd93b9e4e73a006d]:- @medusajs/framework@2.12.4
2.12.3
Patch Changes
#14315
d813fc4ff91e98b475a4eae11780ddc00caf66a8Thanks @adrien2p! - chore(): Migration generator fix generated importUpdated dependencies [
7b4dda5a179c78de5e099231ec407836db4c8dbd,8964a03fa1b9e6a4c443bf5b21d65d41a8441d29,c8a7122ba918751b215dc0b19cf9b09b2c011ab8]:- @medusajs/framework@2.12.3
2.12.2
Patch Changes
#14262
356283c359e5c30e0d31e6c6fd0fb8e16c025b78Thanks @adrien2p! - chore(): Accept an extra agument 'all-or-nothing' on the migrate commandUpdated dependencies [
9f7846ae0babbad39947a1f33d236bff8b5098d0,fe49b567d6d55ae224095c06c710d31d40887653,6dc0b8bed84a330c1c24f4f1331f1ed078430a47,356283c359e5c30e0d31e6c6fd0fb8e16c025b78]:- @medusajs/framework@2.12.2
2.12.1
Patch Changes
- Updated dependencies []:
- @medusajs/framework@2.12.1
2.12.0
Patch Changes
#13999
ef15868ca8b309dc902470b2da0096255da82c5dThanks @juanzgc! - Add metadata support in the promotion model.#13306
78842af1c30de9c7561f10b4129aba4e1f30db27Thanks @olivermrbl! - fix: Compute "virtual" adjustments for order previews#14115
91499081f4584d53690db07f6a9c9f104cd5674eThanks @adrien2p! - chore(): Promotion auto managed joiner config#14176
8ddf8b4d764ae359d279498f08d85146d55077f0Thanks @fPolic! - fix: skip promotion usage limit checks on edit flows#13760
536a3f802c92960b1eab48c37db25a8c542fd231Thanks @fPolic! - feat: promotion usage limit#14172
6bc5bf4fc976a827ea1d1a5b095e370e717a9b24Thanks @pepijn-vanvlaanderen! - Fix not in promotion rule empty value validationUpdated dependencies [
c2c3ad5ba53f1959422fb2d37297a8de8d714782,7e3eb6e41316d7b04d32bc7186ed0c78de1aa539,beb91d88a2f224075e4fcf35a0ee9483b3124504]:- @medusajs/framework@2.12.0
2.11.3
Patch Changes
#13910
224ab39a81e8d3cf3d6fa3ff5eee82541f64728dThanks @adrien2p! - chore(): Dependencies cleanup and improvementsUpdated dependencies [
28c3ea68f5634792848f146ac6af5b27c848bf21,224ab39a81e8d3cf3d6fa3ff5eee82541f64728d,afb40d437b3cc4ceb015df70985b2f005f40eaff,37563987b8fe75c9acfe62957a33e8398977647a,13d7d15be594ca413785eebe8f86b47c36cb9830]:- @medusajs/framework@2.11.3
2.11.2
Patch Changes
- Updated dependencies [
85b1f3d43aa8d8e0269a545ef7867733fd0eb8e2]:- @medusajs/framework@2.11.2
2.11.1
Patch Changes
- Updated dependencies []:
- @medusajs/framework@2.11.1
2.11.0
Patch Changes
#13439
12a96a7c7015f011f5e29a1d387f835e514ba536Thanks @adrien2p! - chore(): Move peer deps into a single package and re export from framework#13451
7dc3b0c5ffdf8eb7070ee5cfd8155c6c4de5c0b1Thanks @fPolic! - feat: support limiting promotion usage by attribute5346079d4717933d31d57f549d4158f3d433551c- chore(): create default refund reasons4c1c1dd4c0790597d7d881bb979bb9c8d8fd35e3- Chore(): Further promotions pre filtering improvementsUpdated dependencies [
12a96a7c7015f011f5e29a1d387f835e514ba536,b9d6f73320c36c53235b12fb8397b30a448917f0,8ece06d8ed6a197ebb370918c49a3ec5c21dd186,92d30b28f45b4037cd73c180c8f257070cf49bd4,02b6d013822b9665f868c4ea6d1b5cfe58723459]:- @medusajs/framework@2.11.0
2.10.3
Patch Changes
#13524
57897c232e23db042f523cbe83b6318b97de519dThanks @adrien2p! - Feat(): promo prepare top level rules filter#13540
4736c58da5de67f6868b4552351a093e67715e4bThanks @adrien2p! - fix(): Prevent promotion filtering to exceed psql limitsUpdated dependencies [
25634b038248ab6501af719faec79b59b496bada]:- @medusajs/framework@2.10.3
2.10.2
Patch Changes
#13446
ac09b3cbeffc11c76b8e5972ee25688b17e5fa58Thanks @adrien2p! - Chore/localised improvement to promotion moduleUpdated dependencies [
b4c0f131b70ba950339c1ca4d81b5ce062a588a3,a4b72f9a21fd1d278c622fcd45d24bb9bfb1e0a8]:- @medusajs/framework@2.10.2
2.10.1
Patch Changes
- Updated dependencies []:
- @medusajs/framework@2.10.1
2.10.0
Patch Changes
#13263
486621383a79e83c831933c1a0ffdae58a695cb0Thanks @willbouch! - feat(dashboard,core-flows,js-sdk,link-modules,promotion): free shipping promotion in dashboard#13294
338a42f72808052f8d4dcbda8e070b97048bac87Thanks @willbouch! - chore(promotion): cleanup old unused promotion codebaseUpdated dependencies [
e413cfefc2e0579ba7c5299dc4f4270310e39c2c,e2213448ac9eb93318570fde2807a3036108d44b]:- @medusajs/framework@2.10.0
2.9.0
Patch Changes
#13078
93d7a93b2806d7e7660a6702c9e9b60d01dfe936Thanks @mikkel-lindstrom! - chore(promotion): in operator work as In insted of equal logic#12960
1bdf602f1c1da181e2839858d2f7e8aea503573aThanks @scherddel! - This fixes the discount_ calculation logic and promotion tax inclusiveness calculation#13084
75320e744f680afba06d8ad852f169242736fb19Thanks @riqwan! - fix(promotion): check currency when computing actions for promotions#13106
9766570827ebf50d49d8daf956deecce6666a8ccThanks @scherddel! - Moved calculation logic from total to original_total to ensure consistent base valuesUpdated dependencies []:
- @medusajs/framework@2.9.0
2.8.8
Patch Changes
- Updated dependencies [
43fb06ecc2d87ea2a11e12524679c142eb890ec7]:- @medusajs/framework@2.8.8
2.8.7
Patch Changes
#12889
2f70f133511857b499a992b65a0a4d6170e03ab9Thanks @adrien2p! - fix(): Order constraint and receive returnUpdated dependencies []:
- @medusajs/framework@2.8.7
2.8.6
Patch Changes
- Updated dependencies []:
- @medusajs/framework@2.8.6
2.8.5
Patch Changes
#12412
2621f00bb035a6b909f9498a2bc98fdba8570ba9Thanks @fPolic! - feat(promotion, dashboard, core-flows, cart, types, utils, medusa): tax inclusive promotions#12644
bd6d9777c50d69115a20334a103a8ab9997b259dThanks @fPolic! - fix(promotion, types): non discountable items checkUpdated dependencies [
cbf3644eb7c8a24eaed879647b58c9ece3373c0e,d517dbd66a47817d1270c278b03add9a5c4244cb,820a936b9836ae83e7a45de1e1ed0488d8cde2fd,00505b4f8e49873123111752adfda47ccb35ab46,94b62c67249d13ec6342411cf7efdedfd0ac47e1]:- @medusajs/framework@2.8.5
2.8.4
Patch Changes
- Updated dependencies [
7685d66c0775167994150e61a8b628ad6289ce23,cf0297f74af1b043363ffbd5a23ca0933097a69d,1f5f50010ae42f8d5b9924edcd75612b1f336463]:- @medusajs/framework@2.8.4
2.8.3
Patch Changes
- Updated dependencies []:
- @medusajs/framework@2.8.3
2.8.2
Patch Changes
- Updated dependencies []:
- @medusajs/framework@2.8.2
2.8.1
Patch Changes
- Updated dependencies []:
- @medusajs/framework@2.8.1
2.8.0
Patch Changes
- Updated dependencies [
b868a4ef4deb7df09d6156a907f4c883cd55a3fd]:- @medusajs/framework@2.8.0
2.7.1
Patch Changes
- Updated dependencies [
ee35f3ce9097832c10cdf2fd168763088e6c3fcb,2f6963a5fbea05537680cb1b1f6a2b9822c36325,b8902637251e9ed4f8762ef280659bbab6d967de]:- @medusajs/framework@2.7.1
2.7.0
Patch Changes
#11799
67b308c8eb52950991df34ac1c8d007a14cfaa1eThanks @riqwan! - fix(promotion): percentage value is accounted for in buyget promotions#12129
d87b25203c3e1aa9b975dc68818d66fe877657a6Thanks @adrien2p! - chore(promotion): Improve performances [1]#11992
c870a7a1baf7db748a831265f06dd4b7378b262eThanks @riqwan! - fix(promotion,utils): fix case where multiple percentage promotions werent appliedUpdated dependencies [
ec56a8bc857a74788df6523af25914da95c4c1d8,2a18a75353f872b0cb4c203afc08cfd82f778428]:- @medusajs/framework@2.7.0
2.6.1
Patch Changes
#11738
3b470f41427e487c68f89b8ee8155de716ffe861Thanks @olivermrbl! - chore: Remove ranges on Medusa packagesUpdated dependencies [
cc1309d3709b251683a0cda0ced448f8bf9f514e,3b470f41427e487c68f89b8ee8155de716ffe861,20cd59e622463fbd46506275648ce681869adcdf]:- @medusajs/framework@2.6.1
2.6.0
2.5.1
2.5.0
Patch Changes
- #11216
016e332e9b98f316cded6eb999927fc942ce56c5Thanks @thetutlage! - feat: make AbstractModuleService create method type-safe
2.4.0
Minor Changes
- #10292
cc73802ab3821d2c667942bd887efb7476205547Thanks @carlos-r-l-rodrigues! - chore: upgrade to mikro-orm 6
Patch Changes
#10915
8119d9964b1617ef2a8b06998f02ce4486484344Thanks @riqwan! - fix(promotion): eval conditions for rules are corrected#11048
da3906efa42ee729c11696e2d3255a60ac3fa958Thanks @adrien2p! - fix: Unique constraint should account for soft deleted recordsUpdated dependencies [
0deffe7b9b9a1055813249b17057b7bba01b78ac,cc73802ab3821d2c667942bd887efb7476205547,13fe2f6776b22c401d131f184fc3600ef4008383,e53b8b0a9708d2eb46258ca417b6ff6abbd5f3d9]:- @medusajs/framework@2.4.0
2.3.1
2.3.0
Patch Changes
- #10950
5eab9e739919594ae7e7e416942ec93d84b699fdThanks @riqwan! - feat(promotion,dashboard,types,utils,medusa): Add statuses to promotions
2.2.0
Patch Changes
- #10795
f7ffa3540f6e293507a1a96c0993b784a58ea507Thanks @riqwan! - fix(promotion): don't evaluate rule condition if conditions to evaluate is empty
2.1.3
2.1.2
Patch Changes
- #10410
fad85a9d293acee1dae784afa223a080b9b8b85bThanks @thetutlage! - refactor: migrate promotion module
2.1.1
Patch Changes
- #10489
f95c4e240c4a5ca0fb88a09636c3d8a2266de279Thanks @riqwan! - fix(promotion, core-flows): updating cart with removed promotion removes adjustments
2.1.0
2.0.7
2.0.6
2.0.5
Patch Changes
- #10119
2822972e04f12d2ca9378dd09529ab6ca308a286Thanks @adrien2p! - Fix/mikro orm cli wrapper
2.0.4
2.0.3
2.0.2
2.0.1
2.0.0
Major Changes
- #7341
2e42e053d4c9d5445d227bdc268c66713aad8e2eThanks @olivermrbl! - chore: Medusa 2.0
Patch Changes
- Updated dependencies [
2e42e053d4c9d5445d227bdc268c66713aad8e2e]:- @medusajs/framework@2.0.0
0.0.4
Patch Changes
- Updated dependencies [
0c0b425de7,8d356217bd,1eeb1e9de3,20e8df914e,27f4f0d724,e0b02a1012,e944a627f0,1a48fe0282,86f499de2f,09a2220569,78f603e4f1,cc557c8752,dd35a4dbff,58c68f6715,1bcb13f892,82a176e30e,11517f0faf,62b9dcc6c1,5d9aea053c,e26cda4b6a,bc06ad2db4,18f3aacee6,232322d035,38c971f111,45c49e89f2,528ef4ca90,65794f4bb5,93ef94cad3,4cf71af07d,4b57c5d286,c78915c7c5,18f3aacee6,667c8609cc,f175cac4af,0a9b9b073d,a6562d2a41,00e6b21bb5,8fd1488938,1c6ba4468e]:- @medusajs/types@1.11.16
- @medusajs/modules-sdk@1.12.11
- @medusajs/utils@1.11.9
0.0.3
Patch Changes
- Updated dependencies [
06f22bb48a,deab12e27e,56481e683d,9073d7aba3,4974f5e455,05e857d256,1ef9c78cea]:- @medusajs/modules-sdk@1.12.10
- @medusajs/types@1.11.15
- @medusajs/utils@1.11.8
0.0.2
Patch Changes
#6700
8f8a4f9b13Thanks @olivermrbl! - chore: Version all modules to allow for initial testingUpdated dependencies [
1fd0457c15,9288f53327,d4b921f3db,ac86362e81,e4acde1aa2,1a661adf3e,56cbf88115,36a61658f9,04a532e5ef,c319edb8e0,0b9fcb6324,586df9da25,b3d826497b,a86c87fe14,640eccd5dd,8ea37d03c9,339a946f38,ac829fc67f,d9d5afc3cf,c3c4f49fc2,9288f53327,0d46abf0ff,fafde4f54d,8dad2b51a2,0c705d7bd4,a6d7070dd6,1d91b7429b,168f02f138,1ed5f918c3,c20eb15cd9,e5945479e0,f5c2256286,000eb61e33,d550be3685,62a7bcc30c,8f8a4f9b13,6500f18b9b,ce39b9b66e,a6a4b3f01a,4d51f095b3,4625bd1241,56b0b45304,cc1b66842c,24fb102a56,e85463b2a7]:- @medusajs/types@1.11.14
- @medusajs/utils@1.11.7
- @medusajs/modules-sdk@1.12.9