My shopping cart has a shipping estimator from ShipperHQ. If the value changes in the zip code field it calculates the shipping cost. If you remove an item from the cart, update the quantity, leave the cart and come back for any reason, the zip code remains in the cart but no estimate appears and a field note displays: Sorry, no quotes are available for this order at this time

How can I fire this javascript on page load?

I see How to update Shipping rates using Ajax when cart item is deleted on Checkout-Cart page?

But where does this go and how is it implemented? Magento 2.4.1 using Luma theme.

1 Answer 1


You shouldn't need to add any JavaScript in order to get the rates to refresh. Every time you make a change, core Magento should be refreshing the rates for you. I've tested this on a new 2.4 install with ShipperHQ installed and I'm not seeing the issue you're describing.

I'd suggest that you check your developer console. I suspect that there's a JS error which is causing the rates to not refresh. The other less likely possibility is that when there's only one item in your cart there's no shipping methods available for some reason. It could be something like the weight of the item is 0 or your rules in ShipperHQ aren't setup correctly. If you're using any kind of 3rd party checkout I'd also disable that temporarily to rule it out.

  • Thanks for signing up to Stack Exchange to give this advice! I thought that was the expected behavior, so I'll check to see what is occurring. There are some errors so I'll get those cleared. Jan 22, 2021 at 15:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.