Question

magento get taxes in checkout page

/app/design/frontend/base/default/template/tax/checkout/tax.phtml

by using this code i got tax_amount(total tax 10%+21%) but i need all taxes individually by tax percent 10%, 21%... I have to display these taxes in checkout page

Mage::helper('checkout')->getQuote()->getShippingAddress()->getData('tax_amount');

So Any help will be much appreciated...

Was it helpful?

Solution

/app/design/frontend/base/default/template/tax/checkout/tax.phtml ---checkout page add the bellow code

$subtotal=Mage::getSingleton('checkout/session')->getQuote()->getSubtotal();
$quote = Mage::getModel("checkout/session")->getQuote();
$shippingAmount = $quote->getShippingAddress()->getShippingAmount();
$i=1;
foreach ($this->getTotal()->getFullInfo() as $info){
$rates = $info['rates']; 
foreach ($rates as $rate){
    if ($i==1){
        $amount2=($subtotal*$rate['percent'])/100;
        echo $this->helper('checkout')->formatPrice($amount2); 
    }
    if ($i==2){
        $amount1=($shippingAmount*$rate['percent'])/100;
        echo $this->helper('checkout')->formatPrice($amount1);
    }
  }
}
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top