In my shopping card build using Magento2.4.2 , I need a dynamic calculation of shipping amount after going to next step after entering the shipping address. What I need is to make a third party API call to calculate shipping value based on address entered. I begin with the following URL but It gives a static shipping value only. I have attached the screenshot of step1 and step2 which will make some sense of what I need. I want to customise the module given in the link to achieve this. I have referenced many articles but could not find a solution. Someone please help to achieve this. The code I have added in same as in the link here
Step 1 : After entering address
Step 2 : Before finalising payment. Here the shipping should not be 0 it should vary according to the address value
Note: I can manage to do the third party call, leave it for me, What I need is to get is where to hook the Magento to modify the shipping value.
There is a good module to handle this kind of things that you may want to take a look at. I think it answer perfectly what you are trying to achieve. Owebia Shipping methods
: https://owebia.com/doc/en/magento2-module-advanced-shipping
It's allowing you to add a config file that determines all available shipping methods, specify the prices using all the information you want from the cart and much more.