Magento Forum

   
Order_id not found while exporting Order?? Can you believe that. 
 
subesh
Sr. Member
 
Avatar
Total Posts:  145
Joined:  2009-01-08
 

I have already written the query to get all the things that i want. to export but ORDER_ID is not comming out…

$collection Mage::getModel('sales/order')->getCollection()
                                   ->
addAttributeToSelect('*')
                                   ->
addAttributeToFilter(array(array('attribute'=>'created_at''datetime'=>true'gt'=>$orderSince)))
                                   ->
joinAttribute('billing_firstname''order_address/firstname''billing_address_id'null'left')
                                   ->
joinAttribute('shipping_firstname''order_address/firstname''shipping_address_id'null'left')
                                   ->
joinAttribute('shipping_lastname''order_address/lastname''shipping_address_id'null'left')
                                   ->
joinAttribute('billing_lastname''order_address/lastname''billing_address_id'null'left')
                                   ->
joinAttribute('order_currency_code''order/order_currency_code''entity_id'null'left')
                                   ->
joinAttribute('status''order/status''entity_id'null'left')
                                                                   
// HERE WHAT SHOULD I ADD
                                   
;

So What should i add here to get the order_id… I am in real trouble .. PLZ help me !

 
Magento Community Magento Community
Magento Community
Magento Community
 
mzentrale1
Guru
 
Total Posts:  731
Joined:  2007-12-06
Stuttgart, Germany
 

Hi,

try with ->getIncrementId()

cheers

 
Magento Community Magento Community
Magento Community
Magento Community
 
subesh
Sr. Member
 
Avatar
Total Posts:  145
Joined:  2009-01-08
 

entity_id=ORDER ID

 
Magento Community Magento Community
Magento Community
Magento Community
 
dragouf
Jr. Member
 
Total Posts:  3
Joined:  2009-04-16
 

hi,

My question is : Why entity_id=order_id ?

where it’s defined ? when it happen ?

thanks

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