Take order amount in 1.3.2.4 but not in 1.4
Hi Buddies,
If we make module which perform some action on order place time in magento 1.3.2.4. 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 1.3.2.4, 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
$order->getBaseGrandTotal()
Cheers :)
If we make module which perform some action on order place time in magento 1.3.2.4. 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 1.3.2.4, 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
$order->getBaseGrandTotal()
Cheers :)
Comments
Post a Comment