Skip to content
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

Shipping Options Service Missing, canCalculate never is called. #9598

Open
amaster507 opened this issue Oct 16, 2024 · 1 comment
Open

Shipping Options Service Missing, canCalculate never is called. #9598

amaster507 opened this issue Oct 16, 2024 · 1 comment

Comments

@amaster507
Copy link

Bug report

Describe the bug

The shipping-options service seems to be missing

System information

Medusa version (including plugins):
Node.js version: 20
Database: postgres
Operating system: linux host with docker containers running node/postgres/redis/etc.
Browser (if relevant): Chrome/NA

Steps to reproduce the behavior

  1. Implement a class extending the AbstractFulfillmentProviderService with the canCalculate and other methods.
  2. Update medusa-config.js to use the custom fulfillment provider service.
  3. Update the admin to use the custom fulfillment provider service and create shipping options using a calculated price.

Expected behavior

The custom fulfullment canCalculate should be called when listing shipping options for a calculated options.

Screenshots

See Discussion linked below

Code snippets

#9495

Additional context

From looking at the 1.x repo, the canCalculate method is called withing the packages > medusa > src > services > shipping-options.ts And this gets called from validatePriceType_ which gets called from validateAndMutatePrice, etc. None of these seem to exist anymore in the v2 repo. Obviously there was a refactor, and I believe these were not added back in after the refactor.

@olivermrbl
Copy link
Contributor

olivermrbl commented Oct 16, 2024

You are right, we haven't added backend support for calculated prices on shipping options yet. This is something we will look into in the coming days or right after the official release :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants