I use the following code to get the order number from the order ID.
$orderId=64; //Order Id will be supplied dynamically $order = Mage::getModel('sales/order')->load($orderId); echo "Order Number is: ".$order['increment_id'];
I get the correct order number using this code, for example, 100000067.
I wanted to know this is the right approach to use.
Please guide.
thanks
source share