Guest Posted July 11, 2005 Share Posted July 11, 2005 Greetings all. I recently installed the add a customer admin contribution that allows you to create customer accounts in the admin tool. It works great. When you register a customer in the tool, it automatically sends the normal welcome e-mail to the customer, letting him/her know that their account has been created. Well, I created a specialized e-mail text for customers that were created manually by the site manager. I defined it as "it to the /catalog/includes/english/create_account.php file. Here's the code: define('EMAIL_ADDED_MANUAL', 'After a long hiatus and many arguments with our hosting company, Wayoutpost.com is finally back in business!' . '<br><br>' . 'As a previous customer of wayoutpost.com, we have kindly created a new account and temporary password for you. Wayoutpost.com, Your Dark Home, is back in full force. We have doubled our t-shirt offering from your favorite Death Metal, Speed Metal, Alternative, Punk and good \'ol Rock-N-Roll bands. Because most of our suppliers are international, we have the most unique design offerings. Your friends won\'t have it unless they bought it from Wayoutpost.com!' . 'Preview the new site here - http://www.wayoutpost.com/catalog' . '.' . 'If you make a purchase before the end of July, Wayoutpost.com will give you a 15% rebate off your purchase price.); I changed the code in the customers.php file (from EMAIL_TEXT to EMAIL_ADDED_MANUAL). Now, instead of the text written above, I get the actual words "EMAIL_ADDED_MANUAL" in the e-mails sent to newly added customers. All I did was simply change the "EMAIL_TEXT" reference to "EMAIL_ADDED_MANUAL" in the code. Here 'tis: $name = $customers_firstname . " " . $customers_lastname; if (ACCOUNT_GENDER == 'true') { if ($HTTP_POST_VARS['customers_gender'] == 'm') { $email_text = sprintf(EMAIL_GREET_MR, $customers_lastname); } else { $email_text = sprintf(EMAIL_GREET_MS, $customers_lastname); } } else { $email_text = sprintf(EMAIL_GREET_NONE, $customers_firstname); } $email_text .= EMAIL_WELCOME . EMAIL_ADDED_MANUAL . sprintf(EMAIL_PASS, $password) . EMAIL_CONTACT; tep_mail($name, $customers_email_address, EMAIL_SUBJECT, nl2br($email_text), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); tep_redirect(tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $customer_id)); } Any ideas? Did I screw up something in the definition? Quote Link to comment Share on other sites More sharing options...
Guest Posted July 11, 2005 Share Posted July 11, 2005 Just a quick clarification. There is an apostrophe (') at the end of the definition statement. for some reason, I accidentally deleted it before posting in the code above. Sorry for the confusion. Quote Link to comment Share on other sites More sharing options...
Guest Posted July 12, 2005 Share Posted July 12, 2005 Greetings all. I just realized that this contribution (create account) adds some definitions in admin/includes/language/english/customers.php. That's where I found the EMAIL_TEXT definition. it was confusing that it happened to be the same definition in the catalog create_account.php file. All resolved now. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.