2013-04-25 58 views
4

我试图从总金额中扣除税额或仅获得小额金额,因此我可以将其置于会员链接中,但我无法在客户点击地点订单按钮后,在最后一个谢谢页面中获取税额或裸计小计。我试图在magento的谢谢页面中获得税额

<?php echo $_product->getData('tax_amount'); ?> 

$totalItemsInCart = Mage::helper('checkout/cart')->getItemsCount(); //total items in cart 
$totals = Mage::getSingleton('checkout/session')->getQuote()->getTotals(); //Total object 
$subtotal = round($totals["subtotal"]->getValue()); //Subtotal value 
$grandtotal = round($totals["grand_total"]->getValue()); //Grandtotal value 


if(isset($totals['tax']) && $totals['tax']->getValue()) { 
    $tax = round($totals['tax']->getValue()); //Tax value if present 
} else { 
    $tax = ''; 
} 

echo $tax; 

,但没有运气,我不能让税额我只能获得与税额小计。所以,请任何帮助,将不胜感激

谢谢

回答

11
Mage::helper('checkout')->getQuote()->getShippingAddress()->getData('tax_amount') 

在这里,你会得到你的税额

相关问题