We can simply use the following code
// To get the shipping and handling charge on shopping cart page
Mage::getSingleton(‘checkout/session’)->getQuote()->getShippingAddress()->getShippingAmount();
// To get discount and tax on shopping cart page
$totals = Mage::getSingleton(‘checkout/session’)->getQuote()->getTotals(); //Total object
// To get the discount
if(isset($totals[‘discount’]) && $totals[‘discount’]->getValue()) {
echo ‘Discount :’. $discount = $totals[‘discount’]->getValue(); //Discount value if applied
} else {
$discount = ”;
}
// To get tax
if(isset($totals[‘tax’]) && $totals[‘tax’]->getValue()) {
echo ‘Tax :’.$tax = $totals[‘tax’]->getValue(); //Tax value if present
} else {
$tax = ”;
}
(Visited 68 times, 1 visits today)