This is how I added the extra field to the admin email. There's probably a better way to do it, but this works.
[skin]/mail/order_notification_admin.tpl - add the following line wherever you want the extra field to show up in the email:
Code:
{$lng.lbl_how_heard}: {$hearabout}
include/func.php - in the function func_place_order add the following:
Code:
$ha_result = func_query_first ("SELECT hear FROM xcart_customers WHERE login='$userinfo[login]'");
$hearabout = $ha_result ["hear"];
$mail_smarty->assign("hearabout",$hearabout);
I added it before the line:
Code:
$prefix = ($order_status=="I"?"init_":"");
I never imagined that adding a field to the checkout form could be so complicated! I really shouldn't be.