Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Add customer last name near top of conf e-mail


knifeman

Recommended Posts

I know there are tons of threads on this subject, but i just cannot get it right.

 

I want to add my customer name right above the STORE NAME in the confirmation e-mail. Preferably first and last name. I am making my attempts with just the last name right now. My first few tries gave fatal errors. After much searching, I came up with this:

// lets start with the email confirmation
 $email_order .= tep_db_output($order->customer['lastname']) . "\n\n";
 $email_order = STORE_NAME . "\n" .
			 EMAIL_SEPARATOR . "\n" .

No error with this, but no text either. Can someone please show me how this should be done?

 

Tim

Link to comment
Share on other sites

Thanks George,

 

I will try it. I have this working, but it is lower than i originally wanted.

// lets start with the email confirmation
 $email_order = STORE_NAME . "\n" .
			 EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .
			 EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";
$email_order .= tep_db_output($order->customer['lastname']) . "\n\n";
 if ($order->info['comments']) {

Link to comment
Share on other sites

The issue is the "." (dot) before the "="

 

Example

 

$kuku = 'hello';

$kuku = 'world';

 

echo $kuku ; gives hello

 

 

$kuku = 'hello';

$kuku .= 'world';

 

echo $kuku ; gives hello world

Link to comment
Share on other sites

  • 4 months later...

Same question... but I'm using 2.2

Here is where I would like to add the customers first name with the email order update

$email = 'CUSTOMERS FIRST NAME HERE' . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]);

This is from my admin/orders.php

Any help would be greatly appreciated... as I've been trying different combinations of code to pull the customers first name from... with no avail.

Thanks.

That "Can" you're about to open... has worms!

Don't say I didn't worn ya.

n. pl. cans of worms Informal - A source of unforeseen and troublesome complexity.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...