Adrien de Peretti
129ad4b687
fix(medusa): Order/Cart decorate totals should assign the items totals ( #2546 )
...
**What**
If `total` or `subtotal` are selected then get the line item totals and assign them to the items.
I also had to remove the totals from the cart update service since they are not used and that by having them the items get the tax lines attached and since the update is performed by passing the entire cart, it is trying to insert the tax lines with the cart update
**Tests**
Add an integration tests to validate that the items includes the totals in the order and draft order
FIXES CORE-687
2022-11-07 13:54:41 +00:00
Philip Korsholm
38d4a7db3d
Feat(Medusa): Allow custom shipping price on draft orders ( #2531 )
...
* create custom shipping option for cart to have custom shipping price on draft orders
* Create moody-chefs-stare.md
2022-11-03 08:44:47 +01:00
Frane Polić
591668d332
fix(medusa): draft order set payment as captured ( #2479 )
...
**What**
- when an order is created from a draft order, set the payment of the order as captured
FIXES CORE-592
2022-10-31 12:24:59 +00:00
Kasper Fabricius Kristensen
fcfb7d167b
fix(medusa): Allow AddressPayload or string on DraftOrder creation ( #1902 )
2022-10-19 18:01:08 +02:00
Oliver Windall Juhl
3f73170288
fix(medusa): Normalize discount code before querying DB ( #2224 )
...
**What**
Normalize discount code before querying DB
Fixes CORE-567
2022-09-16 12:01:36 +00:00
Carlos R. L. Rodrigues
ffd6234356
chore(integration): throw errors on catch blocks ( #2091 )
...
Why:
Suppressing errors and not failing the execution will lead to misleading errors of the following tests.
Fixes CORE-461
2022-08-25 06:36:24 +00:00
Adrien de Peretti
9a3ff32b42
refactor(medusa): Convert DraftOrderService to TS ( #1259 )
2022-06-13 20:29:23 +02:00
Zakaria El Asri
1cfeb5dbd8
feat: line item adjustments ( #1319 )
...
* add: crud services + model + totals
* fix: enforce unique constraint on line item adjustment model and update service (#1241 )
* add: unique constraint on model + fix service
* fix: unique constraint
* fix: add cascade on delete + fix discount relation
* fix: remove optional unique prop
* add: tests for ensuring line item adjustment db constraints (#1279 )
* add: tests for ensuring db constraints
* fix: use given when then
* feat: adjust cart to include line item adjustments (#1242 )
* fix: cart service + cart tests
* fix: remaining tests
* fix: swap tests
* fix: add relationship + fix oas
* refactor: applyDiscount
* fix: refactor applyDiscount and fix + add unit tests
* fix: plugins tests
* feat: line item adjustments draft orders (#1243 )
* fix: draft order tests
* fix: constraint
* fix: wrong variable name
* fix: unique constraint
* progress: add tests
* fix: add cascade on delete + fix discount relation
* fix: remove optional unique prop
* fix: cart removeLineItem + tests
* fix: cart unit tests
* fix: update snapshot
* remove: verbose option
* rename arg
Co-authored-by: Sebastian Rindom <skrindom@gmail.com >
* add: create adjustments for swap additional_items
* add: create adjustments for return lines
* fix: unit test for creating adjustment for additional_items
* fix: create adjustments only for non return items + no deletion when item is a return item
* add: integration tests
* refactor: use refreshAdjustments method
* refactor test
Co-authored-by: Sebastian Rindom <skrindom@gmail.com >
Co-authored-by: Sebastian Rindom <skrindom@gmail.com >
Co-authored-by: Sebastian Rindom <skrindom@gmail.com >
2022-04-12 15:49:31 +02:00
Sebastian Mateos Nicolajsen
cf66f97758
feat: update and cancel swaps, claims, and returns ( #310 )
2021-09-10 13:57:34 +02:00
Sebastian Mateos Nicolajsen
0076332e0e
Fix/create customer in draft order ( #285 )
...
* draft order now creates customer when creating cart
* corrected to update instead of create
* corrected tests
* added creation of customer to create of cart
* removed update function from mock
* added test
* corrected update to update email properly
* corrected tests
* removed unused func
* updated core properly
* removed manual-payment service
2021-09-07 11:15:43 +02:00
Sebastian Rindom
9a701ff229
fix: improves integration tests ( #332 )
...
* fix: improves integration tests
* fix: giftcard order with total 0
* fix: remove breaking eager
2021-08-11 09:26:25 +02:00
Sebastian Rindom
10113d0657
test: adds integration test for shipping-option-requirements
2021-06-08 17:21:42 +02:00
olivermrbl
c0f2d629ab
PR Review fixes
2021-06-07 15:23:41 +02:00
olivermrbl
e79b8f6494
add update-line-item on draft orders
2021-06-04 14:33:51 +02:00
olivermrbl
0516bf7a5f
minor test fix
2021-06-02 18:39:22 +02:00
olivermrbl
83a7d7ec5a
fix pr review
2021-03-11 11:38:16 +01:00
olivermrbl
b65edfce06
PR review modifications
2021-02-19 17:42:18 +01:00
olivermrbl
3ac71e4a4c
draft order func. complete
2021-02-18 15:46:40 +01:00
olivermrbl
c4164e4b66
add payment link func.
2021-02-18 13:22:55 +01:00
olivermrbl
362c5c6055
adds endpoints for draft orders
2021-02-16 16:53:55 +01:00