Home    Articles

 

Get real order id from order increment id in magento

 

This issue comes when you have only the order increment id ( ex: 10000123 ) and nothing else,but you need to fetch all the products from that order.

This is a very simple task
Use this code and the real order id will be stored in $orderId variable:

$orderId = Mage::getModel('sales/order')
             ->loadByIncrementId($orderIncrementId)
             ->getEntityId();

…first time posted on w3bdeveloper.com

by