Discussions

add email address to customer profile display

Hey, i would like to show the email address on the order page in the backend. How can i achieve that? regards Volkan

Posted: Oct 14, 2011

Comments

nodeAche on October 16, 2011

try something like

global $user;
$user_info = user_load($user->kid);

//then to get the user mail go for something like this

$user_info->mail;

i wouldn't touch the module itself but i would create a small block next to it that contains the code above. and fix the look via CSS.

hope this helps

muschpusch on October 23, 2011

rfay: i did that but the customer wants the emailadres on the order page which is kind of useful ;) In the end i added the a field email address to the customer profile display using display suite!

[edit]
The field code:

<?php
 
$order
= commerce_order_load(arg(3));
$customer_user= user_load($order->uid);
echo
$customer_user->mail;
 
?>