2

We have created tax rates in sales->Taxes->Zone&Rates with Rate Percent of xx.xx, Can we fetch this fetch this details programmatically before placing order for using it API.

3

Try this:

$rateCollection = Mage::getModel('tax/calculation_rate')->getCollection()
            ->joinRegionTable();
//echo '<pre>';         
 foreach($rateCollection as $rate) {
     echo 'Country => '.$rate->getTaxCountryId().' Rate Percent => '.$rate->getRate();
     echo '<br>';
 }  
0
1

Agreed with @Abdul,

I also found this another solution ,

$customer_tax_class = '5';
        $rates = $tax->load($customer_tax_class, 'customer_tax_class_id');
        $request = Mage::getSingleton('tax/calculation')->getRateRequest()->setProductClassId(2)->setCustomerClassId(5);
        echo $percent = Mage::getSingleton('tax/calculation')->getRate($request);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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