You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
It would be useful to allow a ShippingEligibilityChecker & ShippingCalculator to attach arbitrary metadata to their results. For example, with a checker/calculator I am implementing which reads from a CSV price table, it would be useful to be able to include data such as "shipping provider" and "estimated shipping time" in addition to the eligibility & price.
Describe the solution you'd like
Currently the ShippingCalculator.calculate() method returns a ShippingPrice object:
I have a CSV file containing data on a number of couriers (DPD, FedEx, Royal Mail etc) plus data on their charges & delivery times to various countries:
In my ShippingCalculator I take the order weight and shipping address to look up the the prices with eligible couriers.
Currently if I call eligibleShippingMethods from my storefront, I only get a single price. I'd like to additionally be able to display the courier and the expected delivery time too. This could be done with this metadata proposal:
It might also be useful to retain this metadata with the order, as a simple-json field shippingMetadata. For now I will avoid this as I wish to be as conservative as possible when it comes to adding new fields to existing entities.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
It would be useful to allow a ShippingEligibilityChecker & ShippingCalculator to attach arbitrary metadata to their results. For example, with a checker/calculator I am implementing which reads from a CSV price table, it would be useful to be able to include data such as "shipping provider" and "estimated shipping time" in addition to the eligibility & price.
Describe the solution you'd like
Currently the
ShippingCalculator.calculate()
method returns aShippingPrice
object:Instead we could return:
This could then be return from the
eligibleShippingMethods
query:Use case
I have a CSV file containing data on a number of couriers (DPD, FedEx, Royal Mail etc) plus data on their charges & delivery times to various countries:
In my ShippingCalculator I take the order weight and shipping address to look up the the prices with eligible couriers.
Currently if I call
eligibleShippingMethods
from my storefront, I only get a single price. I'd like to additionally be able to display the courier and the expected delivery time too. This could be done with this metadata proposal:It might also be useful to retain this metadata with the order, as a
simple-json
fieldshippingMetadata
. For now I will avoid this as I wish to be as conservative as possible when it comes to adding new fields to existing entities.The text was updated successfully, but these errors were encountered: