how can i programmatically get the shipping tax from an order increment_id in magento?

I try this script, but seems not to work.

$order = Mage::getModel('sales/order')->loadByIncrementId("increment_id");
$taxRefunded = $order->getTaxRefunded();



Not sure if you need the shipping tax or shipping cost. Here are both.

$order = Mage::getModel('sales/order')->loadByIncrementId("increment_id");
//shipping cost
$shippingCost = $order->getShippingAmount();
//shipping cost in base currency
$shippingBaseCost = $order->getBaseShippingAmount();
//shipping tax
$shippingTax = $order->getShippingTaxAmount();
//shipping tax in base currenty
$shippingBaseTax = $order->getBaseShippingTaxAmount();
//shipping cost including tax
$shippingCostIncludingTax = $order->getShippingInclTax();
//shipping cost including tax in base currency
$shippingBaseCostIncludingTax = $order->getBaseShippingInclTax();

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.