Open leonlazer opened 6 months ago
For anyone struggeling with the same Issue, I "fixed" it, by adding total
as an extended field of orders. So in loaders/orders.ts
:
export default async function (): Promise<void> {
const adminImports = (await import('@medusajs/medusa/dist/types/orders')) as any
adminImports.defaultAdminOrdersFields = [
...adminImports.defaultAdminOrdersFields,
'total'
]
}
I only needed total, so I just added this one. You could probably get the other remaining fields with this.
As this should be a default field for the list view of orders (like the documentation said) someone who's capable probably can fix this with ease. But at least it's easy to work around with this small code.
Bug report
Describe the bug
Based on the documentation the "/admin/orders" route should have total amount, subtotal etc. in its response.
System information
Medusa version (including plugins): ^1.20.3 Node.js version: 18.19.0 Database: Operating system: Browser (if relevant):
Steps to reproduce the behavior
Expected behavior
It should return
total
,subtotal
,shipping_total
,tax_total
andrefunded_total
Screenshots
This is what I get as a response of the route: