我正试图从总金额中扣除税额,或者只是获得裸小计金额,这样我就可以把它放在一个附属链接中,但我无法在客户点击下订单按钮后的最后一个感谢页面中获得税额或裸小计。我试着:
<?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;
但没有运气;我无法得到税额,我只能得到税额的小计。
Mage::helper('checkout')->getQuote()->getShippingAddress()->getData('tax_amount')
这里是您的税额