github medusajs/medusa v2.0.5

latest release: v2.0.6
10 hours ago

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 the image table
  • product_id has been added to the image 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

Bugs

Documentation

Chores

Other Changes

New Contributors

Full Changelog: v2.0.4...v2.0.5

Don't miss a new medusa release

NewReleases is sending notifications on new releases.