I am struggling with the tax estimate. The scenario is this. When a logged in user changes the state, the tax is not estimated on the basis changed state but based on the state (region) that is in his profile. Can anybody point me to the right direction why this is happening? Thanks.
$post = Mage::app()->getFrontController()->getRequest()->getPost();
$country = (string) $post['country_id'];
$postcode = (string) $post['estimate_postcode'];
$city = (string) $post['estimate_city'];
$regionId = (string) $post['region_id'];
$region = (string) $post['region'];
As i am seeing, the database table sales_flat_quote_address is updated with the new regionid. But if browse once again I can see that the region is reverted to the one that is from customer profile.