-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
feat(core-flows, dashboard, fulfillment, fulfillment-manual, utils, types): create shipping options with calculated prices #10495
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
6 Skipped Deployments
|
|
* For calculated pricing we create an "empty" price set | ||
* so we can have simpler update flow for both cases and allow updating price_type. | ||
*/ | ||
const prices = (option as any).prices ?? [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment: we always create associated price set for a shipping option, both calculated and flat rate, to make the implementation of create and update flows simpler and more unified (e.g. we don't have to duplicate the logic of price set creation in the update flow if the option price type changes to "flat rate")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM
What
validateShippingOptionPricesStep
to handle both SO price_typesvalidateShippingOptionsForPriceCalculation
method toFulfillementModule
canCalculate
andcalculatePrice
to fulfillment provider service service / interface / manual providerCLOSES CMRC-776