Take order amount in but not in 1.4

Hi Buddies,

If we make module which perform some action on order place time in magento and now same thing want to upgrade on 1.4. . But what we see, no payment amount, currency are shown. . (this was happening only when we take order amount from the checkout session which work on 1.3 but not on 1.4).

It is just because, In magento, checkout session was flushed after placing order, but in magento 1.4 version it is flushed on order place time.

Don’t be panic, just take amount, currency, or whatever data you need. . take it from the order object.

$orderId = Mage::getSingleton(‘checkout/session’)->getLastOrderId();
$order = Mage::getSingleton(‘sales/order’)->load($orderId);

//for amount

Cheers :)


Popular posts from this blog

Magento Reindexing problem - take too long time

Magento Navigation menu of CMS pages

Dont want to merge old carts items with current quote