Shipping Prices Not Updated on New / Changed Address


https://forum.kartris.com/Topic6396.aspx
Print Topic | Close Window

By jcosmo - Fri 29 Jan 2016
I ran into an issue where when customers add a new shipping address or change an existing shipping address, the shipping prices were not updating. They would update anytime a Country is changed, but not if the Country selection remained the same.

This is a problem because shipping rates can vary greatly within the same country (US state).

I corrected this by changing line 250 of the CheckoutAddressPopup.ascx.vb file to always call the ContryUpdated event with a new or modified address. I was able to remove the country change detection on line 243 as well.

Ideally there should probably be a separate event for AddressUpdated apart from CountryUpdated since I'm sure CountryUpdated was originally implemented for tax rates. But since shipping rates are also working off this event, it does need to be called whenever there is an address change.
By Paul - Sat 6 Feb 2016
CountryUpdated was to refresh all calculations, tax as well as shipping. I think the safest approach is to just run country updated on any update to an address. There isn't a huge overhead to doing this as it's not something that's going to be happening all the time.