jar*_*rus 4 checkout magento subtotal
我试图从总金额中扣除税额,或者只是获得裸小计金额,以便我可以将其放入联盟链接但我无法在最后一个感谢页面中获得税额或裸小计客户点击下订单按钮后.我试过了
<?php echo $_product->getData('tax_amount'); ?>
Run Code Online (Sandbox Code Playgroud)
和
$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;
Run Code Online (Sandbox Code Playgroud)
但没有运气我无法获得税额我可以得到税额的小计.所以,请任何帮助将不胜感激
谢谢
小智 11
Mage::helper('checkout')->getQuote()->getShippingAddress()->getData('tax_amount')
Run Code Online (Sandbox Code Playgroud)
在这里,您将获得税额
| 归档时间: |
|
| 查看次数: |
14101 次 |
| 最近记录: |