Categories: Magento

How To Get last order ID in Magento?

Magento Get Last Order Id : You can get last order Id in magento by using the following code in Model.


$orders = Mage::getModel('sales/order')->getCollection()
       ->setOrder('increment_id','DESC')
       ->setPageSize(1)
       ->getFirstItem();
    echo $orders->getEntityId()
This will return last incremental order id in Magento

Rohan pathak

Recent Posts

From Tears to Toys: Exploring Modern Childhood through Delhi’s Favorite Toy Shop

In the digital age, the way we experience childhood has changed, but the essence remains the same—imagination, exploration, and joy.…

2 days ago

Confused About Where to Buy Toys in India for your little one? We’ve Got You Covered

Looking for the perfect toy for your child can feel overwhelming with so many choices in today’s market. Whether you're…

3 days ago

A New Age of Play: Exploring the Magic of a Toy Shop in Delhi

In the heart of every child lies a world bursting with imagination — and the key to unlocking that world…

4 days ago

Creating Smiles with Play: The Magic of a Toy Store in Noida

In the fast-paced world of growing cities and digital lifestyles, children need spaces where their imagination is free to roam.…

5 days ago

A World of Wonder: Inside the Most Delightful Toy Store in Delhi

In a city as vibrant and diverse as Delhi, there’s a magic that lives beyond the monuments, food stalls, and…

6 days ago

The Magic of Play: Exploring the Best Toy Shop in Noida and Beyond

In the vibrant and rapidly developing city of Noida, playtime is getting smarter, more imaginative, and more inclusive than ever…

1 week ago