<?php
$subTotal = Mage::getModel('checkout/cart')->getQuote()->getSubtotal();
$totals = Mage::getSingleton('checkout/session')->getQuote()->getTotals();?>
Total Items in Cart: <?php $totalItems = Mage::getModel('checkout/cart')->getQuote()->getItemsCount();
if($totalItems == 0){echo "0";}else{echo $totalItems;}?>
Subtotal: $ <strong><?php $subTotal = Mage::getModel('checkout/cart')->getQuote()->getSubtotal(); echo number_format($subTotal,2); ?>
<?php if(isset($totals['tax']) && $totals['tax']->getValue()) {
echo 'Tax: '.strip_tags(Mage::helper('core')->currency(number_format($totals['tax']->getValue(),2))); //Tax value if present
} ?>
<?php if(isset($totals['discount']) && $totals['discount']->getValue()) {
echo 'Discount: '.strip_tags(Mage::helper('core')->currency(number_format($totals['discount']->getValue(),2))); //Discount value if applied
} ?>
<?php if(isset($order->getShippingAmount)){
echo 'Shipping Charges:'.strip_tags(Mage::helper('core')->currency(number_format($order->getShippingAmount,2)));
}?>
Grand Total: $<?php $grandTotal = Mage::getModel('checkout/cart')->getQuote()->getGrandTotal(); echo number_format($grandTotal,2); ?>
S'il vous plaît utiliser ce code, il sera montrer toutes les informations de panier.
est Mage_Tax activé dans votre configuration. – sulabh
Regardez _System_ -> _Configuration_ -> _Ventes (groupe) _ -> _Tax (onglet) _ paramètres. Et plus précisément à la section _Shopping Cart Display Settings_. Assurez-vous que tout est OK. – alphacentauri