medusajs / medusa

The world's most flexible commerce platform.
https://medusajs.com
MIT License
25.69k stars 2.56k forks source link

Wrong pricing when creating draft order #7816

Open facundocapua opened 4 months ago

facundocapua commented 4 months ago

Wrong pricing when creating draft order

Wrong pricing when using customer groups pricing feature

I have multiple customer groups with different prices for each one. When creating a draft order prices are not updated after selecting a customer and the draft is created using the default prices.

As a workaround, replacing the product with the same one in the order (not draft) admin page makes the pricing right, but it needs multiple extra steps and a refund to be created.

Custom pricing for products is not working

When trying to set a custom pricing for a draft order it's working. Instead, default price is set.

System information

Medusa version (including plugins):

"@medusajs/admin": "7.1.14",
"@medusajs/cache-inmemory": "1.8.10",
"@medusajs/cache-redis": "1.9.1",
"@medusajs/event-bus-local": "1.9.8",
"@medusajs/event-bus-redis": "1.8.13",
"@medusajs/file-local": "1.0.3",
"@medusajs/icons": "^1.2.1",
"@medusajs/medusa": "1.20.7",
"@medusajs/ui": "3.0.0",
"medusa-fulfillment-manual": "1.1.40",
"medusa-interfaces": "1.3.9",
"medusa-payment-manual": "1.0.24",
"medusa-payment-stripe": "latest",
"medusa-plugin-sendgrid": "^1.3.12",
"medusa-react": "9.0.17",

Node.js version: 20.5.1 Database: PostgreSQL 16.1 (Debian 16.1-1.pgdg120+1)

Steps to reproduce the behavior

Steps for "Wrong pricing when using customer groups pricing feature":

  1. Go to 'Orders' section in Admin UI
  2. Click on 'Draft'
  3. Click on 'Create draft order'
  4. Chose region
  5. Add existing item to the order
  6. Select any shipping method
  7. Select customer with custom pricing
  8. Complete shipping and billing address
  9. Click on 'Submit'
  10. Check pricing for product

Expected behavior

Price for product should be the one from customer's group instead of default one.

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 3 days.

facundocapua commented 1 month ago

This is still happening, please don't remove it