For discussing the development and usage of Checkout UI extensions, post-purchase extensions, web pixels, Customer Accounts UI extensions, and POS UI extensions
Our store offers different delivery options as well as different prices based on the items, postcode and delivery date. We have our own CarrierService that uses this data to return the available options and prices.
We currently add the delivery address to the checkout(shippingAddress) and the delivery date chosen by the customer to the attributes of the order items(checkoutLineItems.attributes), using storefrontAPI before getting to the checkout, this way the price is calculated correctly using this information.
Our goal is to remove this previous step and using the new checkout extensibility features, add a dataPicker to the checkout.
The flow would be something like this:
It is also necessary to recalculate delivery fees each time the delivery date changes, in the same way as it would if the delivery address changes.
We have already added the datapicker to the checkout using Checkout UI Extension, we have also managed to add the date to cartLineItems.
The question is, how can we get the delivery price to be recalculated after a date is selected/changed?
Thank you