-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Custom Fulfillment provider service unexpected behavior #10002
Comments
@malvere, thanks for the report. We currently don't support calculated shipping option prices. However, we are tracking this issue internally and will introduce it within a month or two. |
Wish I had known that before spending the time to write an SDK for a fulfillment provider. You guys really should have some sort of resource somewhere that outlines what is currently supported and what isn't. I also believe you should add metadata or something to easily be able to add extra data to shipping options, per warehouse/inventory location, which will then be available in the fulfillment service props. The |
I'm joining this club here. To clarify: You're providing an SDK or the option to create a shipping option with dynamic pricing which isn't yet implemented? I'd really wish to read a disclaimer like: "Here's the SDK, though it's not functional in Medusa v2" This really sucks and not even providing a clear error. I mean, there's a Guide in the docs on how to create a dynamic shipping option. That's not how guides work IMO. Please remove that section or add a disclaimer as mentioned above. |
Any update on this @olivermrbl ? |
Hey guys – we will be adding support for this this week or next. To help us understand the different use cases, could I get you to share what you expect to use to calculate prices for shipping options? For example, products, variant, addresses, etc. We will need to pass this data down to the provider. |
Sounds good. I expect it to take all the items in the shopping cart as an argument and the shipping address. Off of that, it should be able to calculate the price. |
@mawoka-myblock, thanks for sharing. That's exactly what we will be adding initially. You can track the PR here. |
Awesome, subscribed for updates, thanks! But please don't forget to adjust the docs accordingly to your changes! |
+1 here i would like to have item (product properties) to calculate shipping based on product weight (maybe length width height in future for volume) Wait for news! |
Package.json file
Node.js version
v22.9.0
Database and its version
PostgreSQL 16
Operating system name and version
macOS 14.6.1
Browser name
Safari/Firefox/Chrome
What happended?
Custom fulfillment provider service implementation not working as expected,
canCalculate
never calledExample service implementation as stated in https://docs.medusajs.com/resources/references/fulfillment/provider
service.ts
:index.ts
:Expected behavior
Shipping price should be explicitly set to
1000
. Or any number returned fromcanCalculate
methodActual behavior
If Shipping option is created and prices are left blank in shipping option's settings then there is an error
error: Shipping options with IDs so_01JC9EHG28WM656FBNVT6JVHRF do not have a price
If price is provided in Shipping option settings via Admin UI, then prices in those options will override anything returned by
canCalculate
Link to reproduction repo
https://github.com/medusajs/medusa
The text was updated successfully, but these errors were encountered: