0

this :

$order = Mage::getSingleton('sales/order')->loadByIncrementId($order_id);
var_dump($order);

will return the details of an order by increment_id, however I only get customer_id, what to do in order to return for example the date of birth ? (without fetching information about the customer with the customer_id)

1

it just go simple,Just

use $order->getCustomerDob();,

At customer_dob column at sales_flat_order table of db magento has save customer dob

2
0

Remember guest orders are not associated with any customer.

Hope this helps.

Update [1]

Even better way:

//get only guest orders
$orders = Mage::getModel('sales/order')->getCollection(); 

//print all customer who made guest checkout
foreach($orders as $order){
   echo "<pre>".$order->getCustomerFirstname() ." ".$order->getCustomerLastname()." - ".$order->getCustomerEmail()."</pre>";
   //...........
   //there are lot of other customer attributes you can print.
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.