'Amasty shipping calculator does not show delivery rates unless product is added to cart

An API call is being to /amshipcalc/estimate/ajax/?country_id=AU&postcode=2000&product=601&selected_configurable_option=&related_product=&item=601 &form_key=eQBtuwh1qAglNoDR&qty=2&qty=4

to fetch shipping rates. But the rates are displayed only after adding product to cart.

API Results when product is added to cart is as outlined below. It shows delivery rates -

Standard Delivery $0.00 Express Delivery $15.00 Flat Rate Fixed $6.50 Store Pickup Pickup $0.00 API Results when cart is empty is as outlined below. It does not show delivery rates -

<table class="items methods">
                                                <tr class="item-title"><th colspan="2"><span>Flat Rate</th></span></tr>
            
            <tr class="item-options">
                                    <td class="method-title">Fixed</td>
                    <td><span class="price">$6.50</span></td>
                            </tr>
                                                            <tr class="item-title"><th colspan="2"><span>Store Pickup</th></span></tr>
            
            <tr class="item-options">
                                    <td class="method-title">Pickup</td>
                    <td><span class="price">$0.00</span></td>
                            </tr>
                        </table>

API request details are the same but the response is different.



Solution 1:[1]

The answer was found by contacting Amasty support. something to do with incorrect behaviour from Magento MSI and the change was related to quote.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Anitha Jose Kurian