2012-07-25 96 views
0

我的购物车显示错误的小计,我认为这是als影响购物车和结帐时的税(20%)计算(价格在这里是正确的,但小计,总数没有20 %增值税)
任何想法可能是什么问题?Magento,我的购物车,小计

新用户..我不能发表图片

+0

在您的配置中启用了Mage_Tax。 – sulabh 2012-07-25 18:03:27

+0

看看_System_ - > _Configuration_ - > _Sales(组)_ - > _Tax(标签)_设置。更确切地说在_Shopping Cart Display Settings_部分。确保那里一切正常。 – alphacentauri 2012-07-25 18:16:52

回答

0
<?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); ?> 

请使用此代码,它会显示所有的车的信息。