0
我的購物車顯示錯誤的小計,我認爲這是als影響購物車和結帳時的稅(20%)計算(價格在這裏是正確的,但小計,總數沒有20 %增值稅)
任何想法可能是什麼問題?Magento,我的購物車,小計
新用戶..我不能發表圖片
我的購物車顯示錯誤的小計,我認爲這是als影響購物車和結帳時的稅(20%)計算(價格在這裏是正確的,但小計,總數沒有20 %增值稅)
任何想法可能是什麼問題?Magento,我的購物車,小計
新用戶..我不能發表圖片
<?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); ?>
請使用此代碼,它會顯示所有的車的信息。
在您的配置中啓用了Mage_Tax。 – sulabh 2012-07-25 18:03:27
看看_System_ - > _Configuration_ - > _Sales(組)_ - > _Tax(標籤)_設置。更確切地說在_Shopping Cart Display Settings_部分。確保那裏一切正常。 – alphacentauri 2012-07-25 18:16:52