Magento Forum

   
Get tax from order
 
peterbergman
Jr. Member
 
Total Posts:  13
Joined:  2013-01-03
 

Hi,

I am writing an observer that extracts order information on the order confirmation page.

$orderId Mage::getSingleton(\'checkout/session\')->getLastOrderId();
$order Mage::getModel(\'sales/order\')->load($orderId);

On this page I need to get the amount of tax that was applied to the order. Any suggestions on which method(s) to use?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Magikvishal
Sr. Member
 
Total Posts:  277
Joined:  2012-06-12
 

Hello check below code

$orderId Mage::getSingleton(\'checkout/session\')->getLastOrderId();
$order Mage::getModel(\'sales/order\')->load($orderId)
$order->getTaxAmount();
Hope this help you…

 
Magento Community Magento Community
Magento Community
Magento Community
 
peterbergman
Jr. Member
 
Total Posts:  13
Joined:  2013-01-03
 

Hi,

Great, thank you. That works. It think I tried it earlier but it turned out that it was the tax rules that was set up incorrectly.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top