Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
How to get order total amount in my custom file ?
try Following way...
$order = Mage::getSingleton('sales/order')->loadByIncrementId($orderId);
Basically we get order total amount like this :
$order = Mage::getModel("sales/order")->loadByIncrementId($orderId); // get order
$order = Mage::getModel("sales/order")->load($orderId);
$totalPrice = $order->getGrandTotal();
echo $totalPrice; exit;
$order = Mage::getModel("sales/order")->load($orderId); $orders = var_dump($order->getData()); print_r($orders);
Required, but never shown