Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

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:  278
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