View Single Post
  #18  
Old 08-07-2003, 08:06 PM
 
eleven eleven is offline
 

Senior Member
  
Join Date: Nov 2002
Location: Charlotte, NC, USA
Posts: 118
 

Default In case anyone else is interested...

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.
__________________
|| E L E V E N ||
Reply With Quote