Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

ASK Get a Order Id in History Order (My Account)
 
muhammad hafidz
Jr. Member
 
Total Posts:  1
Joined:  2008-08-02
 

Hi,

I want to get a order id in http://localhost/magento/index.php/sales/order/history/
but i just wanna get order “1” not 100000001.

Anybody can help me?

Thank You

 
Magento Community Magento Community
Magento Community
Magento Community
 
Indies Inc
Sr. Member
 
Avatar
Total Posts:  193
Joined:  2013-09-18
 

Hi,
Get order id in the complete format on your page like this. Remember to filter the collection based on your requirement.

$orders Mage::getModel('sales/order')->getCollection()
            ->
Load(); 
      foreach (
$orders as $order_item
      
{
       
Echo $order_item->getEntityId();
       
$order Mage::getModel('sales/order')->load($order_item->getEntityId());
       
Print_r ($order);   // this is the array of order. So print as per your format.
       
}

Hope this will help you.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top