3

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...

0

/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);
    }
  }
}

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.