2

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

3

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.

  • 1
    I don't want total amount of the order. I want the individual product tax amount. Thanks – Kumar Jun 18 '15 at 10:57
  • Check my updated answer. – Adarsh Khatri Jun 18 '15 at 11:09
  • 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? – ahnbizcad Dec 15 '15 at 4:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.