I want to get tax amount of a product in success page. I'm getting price of a product but not tax amount from order object. can anyone please help me on this. Thanks
1 Answer
Try this:
echo Mage::helper('checkout')->getQuote()->getShippingAddress()->getData('tax_amount')
in your checkout success page.
Hope this helps.
update
$orderId = $this->getOrderId();
$items = Mage::getResourceModel('sales/order_item_collection')->load($orderId);
foreach($items as $item){
echo '<pre>'.$item->getName() . ' ' . $item->getTaxAmount().'<pre>';
}
Note: I haven't tested it but should work.
-
1I don't want total amount of the order. I want the individual product tax amount. Thanks– KumarCommented Jun 18, 2015 at 10:57
-
-
why does magento make you go through shipping address in order to get the tax amount. isn't this terrible api design and violation of all kinds of code design principles? Commented Dec 15, 2015 at 4:55