Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

how to display customer's name email address on Order Update Email?


superkingkong

Recommended Posts

hi guys,

 

hope i can get some help here.

 

i'm trying to include customer name and email on the order update email sent by system when there is update on the order. how can i do this?

 

something like.

 

dear mr. smith,

 

thanks a lot.

Link to comment
Share on other sites

		  tep_db_query("update " . TABLE_ORDERS . " set orders_status = '" . tep_db_input($status) . "', last_modified = now() where orders_id = '" . (int)$oID . "'");

	  $customer_notified = '0';
	  if (isset($HTTP_POST_VARS['notify']) && ($HTTP_POST_VARS['notify'] == 'on')) {
		$notify_comments = '';
		if (isset($HTTP_POST_VARS['notify_comments']) && ($HTTP_POST_VARS['notify_comments'] == 'on')) {
		  $notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $comments) . "\n\n";
		}

		$email = EMAIL_TEXT_GREETING . $order->customer['firstname'] . ' ' . $order->customer['lastname'] . ',' . "\n\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . '<a href="' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . '">' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . '</a>' . "\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]) . "\n" . STORE_NAME . "\n\n" . EMAIL_TEXT_FOOTER1 . '' . $order->customer['email_address'] . '' . EMAIL_TEXT_FOOTER2;

	   $email_subj = EMAIL_TEXT_SUBJECT1 . ' - ' . EMAIL_TEXT_ORDER_NUMBER .  ' ' . $oID . ' - ' . EMAIL_TEXT_SUBJECT;

		tep_mail($check_status['customers_name'], $check_status['customers_email_address'], $email_subj, $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);


		// tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

		$customer_notified = '1';
	  }

 

the above is part of my admin/order.php

 

I'm not sure if i've done it right, but looks like i'm wrong.

 

The first name, last name and the email address are not displaying

 

$order->customer['email_address']

$order->customer['firstname']

$order->customer['lastname']

 

did i miss out something?

 

thanks in advance.

Link to comment
Share on other sites

Replace this code snippet:

 

$order->customer['firstname'] . ' ' . $order->customer['lastname']

With:

$check_status['customers_name']

Replace this code snippet:

 

$order->customer['email_address']

With:

$check_status['customers_email_address']

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...