Highlights
Product image reordering
Warning
Schema changes
We have introduced support for re-ordering product images. Product images now have a rank
field. The field is set based on the index of the image in the images
payload to create and update products.
For example:
POST /admin/products
{ images: [{ url: "one" }, { url: "two" }]
Will translate to the following:
{ ..., images: [{ url: "one", rank: 0 }, { url: "two", rank: 1 }]
The same pattern is followed when updating the product.
Images are always sorted by the rank.
Schema changes
This feature comes with changes to the data models of the product module:
- The relationship between product and images has changed from a many-to-many to one-to-many. As a result, the pivot table
product_images
has been dropped rank
has been added to theimage
tableproduct_id
has been added to theimage
table
Upgrade guide
To apply the latest migrations run the following command:
npx medusa db:migrate
Cart customer transfers
We have added support for transferring carts from a guest to a registered customer.
The flow is as follows:
Create cart with guest customer
POST /store/carts
{ email: "guest@customer.com" }
Transfer cart to registered customer
POST /store/carts/:id/customer
The call to transfer assumes you are signed in and uses the customer ID from the authentication context on the request.
New languages
Our admin dashboard has been translated into German, Spaning, Turkish, and Polish
Features
- feat(core-flows): order add quantity diff by @carlos-r-l-rodrigues in #10065
- feat(product): Make product option value linkable by @adrien2p in #10116
- feat(medusa, types, utils, core-flows, order) request & accept order transfer by @fPolic in #10106
- feat: add optional fields by @thetutlage in #10150
- fix(dashboard): order edit - display item quantity change correctly by @fPolic in #10078
- feat(core-flows,medusa): Add API to update cart's customer by @riqwan in #10151
- feat(medusa): request order transfer storefront API by @fPolic in #10156
- feat(types, js-sdk): add updateCustomer to js-sdk by @riqwan in #10158
- feat: add support for making relationships searchable by @thetutlage in #10172
- feat(workflows-sdk): add response to permanent failure by @carlos-r-l-rodrigues in #10177
- feat(medusa): skip draft orders on order list by @riqwan in #10195
- feat(core-flows,medusa): remove cart customer validation + rename workflow by @riqwan in #10207
- feat(dashboard): transfer order admin by @fPolic in #10189
- feat(medusa,core-flows,types,js-sdk): decline / cancel order transfer by @fPolic in #10202
- feat(product,dashboard): Allow re-ordering images by @kasperkristensen in #10187
Bugs
- fix(orchestration): fix set step failure by @carlos-r-l-rodrigues in #10031
- fix(core-flows): capture before order created by @carlos-r-l-rodrigues in #9980
- fix: do not update the .env.template file with the database name by @thetutlage in #10073
- fix(core-flows): Fix date usage accross workflows by @adrien2p in #10100
- fix(admin-shared,dashboard): Add missing injection zones by @kasperkristensen in #10098
- fix(dashboard): Fix active nav link styling for built-in routes by @kasperkristensen in #10082
- fix(dashboard): Add missing inventory list zones by @kasperkristensen in #10117
- fix(dashboard): Add Breadcrumb components by @kasperkristensen in #10079
- fix(product): wrong snapshot name and inexistent script by @adrien2p in #10119
- fix(inventory): update reservation quantity by @carlos-r-l-rodrigues in #10139
- fix(payment): Idempotent cancellation and proper creationg fail handling by @adrien2p in #10135
- fix: add address and customer metadata to tax calc context by @srindom in #10122
- fix(core-flows): Add missing cart sales channel id fields to be part of the application context by @adrien2p in #10142
- fix(product): Update full descendant tree mpath when updating parent category id by @adrien2p in #10144
- fix(dashboard): updated variant title is used when creating product by @riqwan in #10155
- fix(framework,types): correct example of database driver options by @riqwan in #10166
- fix: Remove undefined from events in update by @olivermrbl in #10170
- fix(types): fix AdminBatchProductRequest to have product ID by @shahednasser in #10168
- fix: incorrect changeset breaks preview builds by @riqwan in #10173
- fix: move transfer cart under cart by @riqwan in #10175
- fix(framework): handle deprecated Dirent path by @carlos-r-l-rodrigues in #10179
- feat(medusa): enable price list prices for product endpoints by @riqwan in #10197
- fix: Update js-sdk with token by @olivermrbl in #10211
- fix(types): Graph types fixes by @adrien2p in #10220
- fix(js-sdk): Preserve
path
inbaseUrl
by @kasperkristensen in #10222 - fix(admin-vite-plugin): Move @babel/types to dependencies from devDependencies to make it compatible with Yarn PnP by @kasperkristensen in #10236
Documentation
- Fix grammar issue in the doc by @webgodo in #10064
- Fix Typo in Documentation by @hadicph in #9989
- docs: fix slugs pointing to admin rather than store routes by @shahednasser in #10063
- docs: remove duplicate buttons in code actions by @shahednasser in #10061
- docs: add documentation on validateAndTransformQuery by @shahednasser in #10060
- docs: fix error to medusa configuration guide by @shahednasser in #10059
- docs: update event module guide by @shahednasser in #10056
- docs: document multiple steps usage in a workflow by @shahednasser in #10053
- docs: change useRemoteQueryStep to useQueryGraphStep by @shahednasser in #10051
- docs-util: fix helper step settings by @shahednasser in #10045
- docs: added note about test timeout by @shahednasser in #10041
- docs: fix outdated links by @shahednasser in #10040
- docs: add emit events + types documentation by @shahednasser in #10026
- docs: fix types of injection zone props by @shahednasser in #10074
- docs: added + updated build and deployment guides by @shahednasser in #10019
- docs: update to next 15 + eslint 9 by @shahednasser in #9839
- docs: fix oneOf design hiding more than three items by @shahednasser in #10077
- docs-utils: make reference table of content in alphabetical order by @shahednasser in #10084
- docs: improv version detection + fix breadcrumbs by @shahednasser in #10083
- docs: add missing import in digital product recipe by @shahednasser in #10094
- docs: fix client error for learning path by @shahednasser in #10102
- docs: add guide on how to translate admin by @shahednasser in #10095
- docs: update admin injection zones list by @shahednasser in #10103
- docs: add note about using dates in workflows by @shahednasser in #10107
- docs: document nested UI routes by @shahednasser in #10104
- docs: fix copy in code blocks with tabs by @shahednasser in #10123
- docs: add missing prerequisite in stripe's storefront integration by @shahednasser in #10097
- docs: S3 providers - add example for DigitalOcean Spaces endpoint by @JohnGemstone in #10145
- docs: fix error on collapsing prerequisites by @shahednasser in #10153
- docs: remove section on updating cart's customer by @shahednasser in #10154
- docs: fix provider ID in payment's webhook URL by @shahednasser in #10157
- docs: change report issue link by @shahednasser in #10160
- docs-util: remove duplicate methods from JS SDK reference by @shahednasser in #10161
- docs: add section on querying records from a link's table by @shahednasser in #10165
- docs: fix heading import in ui route docs by @shahednasser in #10167
- chore(js-sdk,types): add tsdocs for admin JS SDK methods [6/n] by @shahednasser in #10028
- docs: add Sanity integration guide by @shahednasser in #10152
- chore: optimize sanity opengraph image by @shahednasser in #10181
- docs: revise intro pages by @shahednasser in #10182
- docs: fix font smoothing across projects by @shahednasser in #10183
- docs: add default value if PAK environment variable isn't set by @shahednasser in #10185
- docs: revise medusa container chapter by @shahednasser in #10192
- docs: migrate Kapa by @shahednasser in #10198
- Set proper name for the steps in the schedule-task page by @webgodo in #9716
- docs: fix og image for sanity guide by @shahednasser in #10205
- docs: update og images by @shahednasser in #10206
- docs: change logo by @shahednasser in #10208
- docs: revise modules by @shahednasser in #10204
- docs: revise commerce modules by @shahednasser in #10209
- docs: revise loaders documentation by @shahednasser in #10224
- chore: fix cURL example in create payment collection route by @shahednasser in #10219
- docs: revise events and subscribers by @shahednasser in #10227
- docs: fix base path not added to hash links by @shahednasser in #10235
Chores
- chore(event-bus): event bus error handling by @carlos-r-l-rodrigues in #10085
- chore(local-file): throw error if file exist by @carlos-r-l-rodrigues in #10087
- chore(workflows-sdk): Display each error individually instead of packed by @adrien2p in #10072
- chore(): Update module provider retrieval error message and type by @adrien2p in #10138
- chore(core-flows,types): add TSDocs for useQueryGraphStep by @shahednasser in #10042
- chore(medusa): remove unfinished update order endpoint by @riqwan in #10169
- fix(stripe): Wrong container type by @adrien2p in #10223
Other Changes
- Feat: add german language support by @pixelwiese in #9892
- test: add tests for self relationships by @thetutlage in #10071
- feature: Add email to google provider-identity metadata by @Furman1331 in #10081
- feat: Add Turkish Language by @ertyurk in #10109
- refactor: rename workflow to singular by @thetutlage in #10134
- Refactor/finish rename order by @thetutlage in #10136
- Revert "feat: add optional fields" by @thetutlage in #10159
- docs: fix fulfillment module container name by @mimukit in #10111
- update CreateOrderFulfillmentWorkflowInput by @420coupe in #9479
- Fix typo in db error message by @Stenz123 in #9612
- fix typo in page.mdx by @pedrotigre in #10210
- Support spanish translation by @ederwii in #10213
- fix: correct ID used for refetching after updating customer by @oDestroyeRo in #10231
New Contributors
- @pixelwiese made their first contribution in #9892
- @hadicph made their first contribution in #9989
- @Furman1331 made their first contribution in #10081
- @ertyurk made their first contribution in #10109
- @JohnGemstone made their first contribution in #10145
- @mimukit made their first contribution in #10111
- @Stenz123 made their first contribution in #9612
- @ederwii made their first contribution in #10213
Full Changelog: v2.0.4...v2.0.5