how to get order object by increment id?

1
35
views
Advertisement

Hello,

 

We can get order object by increment id using following code:

$orders = Mage::getModel('sales/order')
  ->getCollection()
  ->addAttributeToFilter('increment_id', 100000001)
  ->getFirstItem();

 

Thanks,

Mayank Zalavadia 🙂