php - Tax Estimate in Magento -


i struggling tax estimate. scenario this. when logged in user changes state, tax not estimated on basis changed state based on state (region) in profile. can point me right direction why happening? thanks.

$post = mage::app()->getfrontcontroller()->getrequest()->getpost(); $quote= mage::getsingleton('checkout/cart')->getquote(); $country    = (string) $post['country_id']; $postcode   = (string) $post['estimate_postcode']; $city       = (string) $post['estimate_city']; $regionid   = (string) $post['region_id']; $region     = (string) $post['region'];  $quote->getshippingaddress() ->setcountryid($country) ->setcity($city) ->setpostcode($postcode) ->setregionid($regionid) ->setregion($region) ->setcollectshippingrates(true); $quote->collecttotals(); $quote->save(); 

as seeing, database table sales_flat_quote_address updated new regionid. if browse once again can see region reverted 1 customer profile.

please try add price rules catalog -> price rules , create rules on basis of state.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -