Hi,
How can I get the last running transaction Id ? (eg: 10000001) I've tried numerous ways, with no success.
Hi,
How can I get the last running transaction Id ? (eg: 10000001) I've tried numerous ways, with no success.
Try this:
$orderId = Mage::getSingleton('checkout/session')->getLastRealOrderId();
I was suddenly enlightened when I looked at the problem again at home. Why not get the last order increment id from the sales/order collection?
$orders = Mage::getModel('sales/order')->getCollection()
->setOrder('increment_id','DESC')
->setPageSize(1)
->setCurPage(1);
echo $orders->getFirstItem()->getIncrementId();
Tested and working on Magento 1.3.2.3