#draft order's shipping_methods empty after medusa update. Now my frontend is broken.

5 messages · Page 1 of 1 (latest)

zealous vine
#

System information

Medusa version (including plugins): ^1.14.0
Node.js version: 18.16.1
Database: postgres

I have built a management tool for a business where they can create draft orders and send the quotes to customers. After the quote (draft order) is accepted it will turn into an actual order.

I have three regions, each with a manual shipping option which is flat rate of 0 euros and visible for admin-only. On draft order create I pass this shipping method like so:

{
    "status": "open",
    "email": "[email protected]",
    "customer_id": "cus_01H1F8XSW7N4DD68WCNCSGDKHK",
    "billing_address": {
        "first_name": "Boris",
        "last_name": "Kamp",
        "phone": "0655718742",
        "company": "Cooly BV",
        "address_1": "Zwartendijk 31",
        "address_2": null,
        "city": "Naaldwijk",
        "country_code": "be",
        "province": null,
        "postal_code": "2671LL"
    },
    "shipping_address": {
        "first_name": "Boris",
        "last_name": "Kamp",
        "phone": "0655718742",
        "company": "Cooly BV",
        "address_1": "Zwartendijk 31",
        "address_2": null,
        "city": "Naaldwijk",
        "country_code": "be",
        "province": null,
        "postal_code": "2671LL"
    },
    "region_id": "reg_01H123PC1HGBNC38RJ7J5ABPSN",
    "shipping_methods": [
        {
            "option_id": "so_01H59FF7BBX7ZXG89DJZP692K5"
        }
    ],
}

When I then fetch the draft order I see the cart.shipping_methods array populated with this shipping method.
When I then post a line item like so:

{
  "variant_id": "variant_01H5MGMWTZZ40XTN76TEH7YJNA",
  "unit_price": 900,
  "quantity": 1
}

My cart.shipping_methods is empty! I have not had this before I updated to Medusa 1.14.0 (came from 1.13.0).
Does this ring a bell with any of you authors?

Now my client's business portal is broken as they cannot continue as no cart.shipping_methods is available.

unique summit
#

You can revert to 1.13 for now. cart.shippping_methods is emptied with each cart line update since 1.14. Is this what is happening?

zealous vine
# unique summit You can revert to 1.13 for now. cart.shippping_methods is emptied with each cart...

Yes that is happening. I just got a reply on Github saying the same. This was my reply there:
‘okay, but then how do I add the method again? Are they reset if if they are valid? I dont get it why I can create a draft order with this method, add an item and then the method is gone. The method had no requirements like min-max or whatever so it should always be valid unless Im missing something?’

zealous vine
#

I still have this issue when I want to update. Now I cannot update and getting behind on Medusa versions which I don't like.

I can't imagine I'm the only one having this problem out here.

#

Is there anybody who knows what Im doing wrong here?