Magento Get Latest Order created


Magento Get Latest Order created : You can get latest order created in magento.


Magento Get Latest Order created Syntax

You can get latest order as below :


$order = Mage::getModel('sales/order')->getCollection()
		                      ->setOrder('created_at','DESC')
				      ->setPageSize(1)
				      ->setCurPage(1)
				      ->getFirstItem();

Which will return the latest order created


Advertisements

Add Comment

📖 Read More