knifeman Posted September 14, 2011 Posted September 14, 2011 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
multimixer Posted September 14, 2011 Posted September 14, 2011 Try this // lets start with the email confirmation $email_order = 'Any text you want to add' . tep_db_output($order->customer['lastname']) . "\n\n"; $email_order .= STORE_NAME . "\n" . My community profile | Template system for osCommerce - New: Responsive | Feedback channel
knifeman Posted September 14, 2011 Author Posted September 14, 2011 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']) {
multimixer Posted September 14, 2011 Posted September 14, 2011 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 My community profile | Template system for osCommerce - New: Responsive | Feedback channel
forummaker Posted February 9, 2012 Posted February 9, 2012 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.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.