Party Posted March 5, 2007 Posted March 5, 2007 Hi all The e-mail OSCOMMERCE is sending after the registration. create_account.php I want to change to it not are using the Surname but the first name. I think it have something to do with this: define('EMAIL_SUBJECT', 'Välkommen till ' . STORE_NAME); define('EMAIL_GREET_MR', 'Hej Herr. %s,' . "\n\n"); define('EMAIL_GREET_MS', 'Hej Fru. %s,' . "\n\n"); define('EMAIL_GREET_NONE', 'Hej %s' . "\n\n"); the hole create_account.php looks like this: <?php /* $Id: create_account.php,v 1.11 2003/07/05 13:58:31 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ define('NAVBAR_TITLE', 'Skapa ett konto'); define('HEADING_TITLE', 'Kontoinformation'); define('TEXT_ORIGIN_LOGIN', '<font color="#FF0000"><small><b>OBS:</b></font></small> Om du redan har ett konto hos oss, vänligen logga in på <a href="%s"><u>den här sidan</u></a>.'); define('EMAIL_SUBJECT', 'Välkommen till ' . STORE_NAME); define('EMAIL_GREET_MR', 'Hej Herr. %s,' . "\n\n"); define('EMAIL_GREET_MS', 'Hej Fru. %s,' . "\n\n"); define('EMAIL_GREET_NONE', 'Hej %s' . "\n\n"); define('EMAIL_WELCOME', 'Välkommen till <b>' . STORE_NAME . '</b>.' . "\n\n"); define('EMAIL_TEXT', 'Du kan nu ta del av <b>olika tjänster</b> som vi har att erbjuda. Några av de tjänsterna är:' . "\n\n" . '<li><b>Permanent varukorg</b> - Alla varor som läggs i varukorgen kommer att finnas kvar online tills du tar bort dom, eller går till kassan med dom.' . "\n" . '<li><b>Adressbok</b> - Vi kan även skicka dina varor till en annan adress än din egen, det är perfekt ifall du vill skicka en födelsedagspresent direkt till den som fyller år.' . "\n" . '<li><b>Orderhistorik</b> - Se din orderhistorik på alla varor du har köpt hos oss.' . "\n" . '<li><b>Produktrecensioner</b> - Dela med dig av vad du tycker om produkterna med till andra kunder. <br> Du får också vårt nyhetsbrev och kan delta i tävlingar och utlottningar.' . "\n\n"); define('EMAIL_CONTACT', 'För att få hjälp med någon av våra tjänster så kan du e-posta butiksägaren: ' . STORE_OWNER_EMAIL_ADDRESS . '.' . "\n\n"); define('EMAIL_WARNING', '<b>OBS:</b> Den här e-postadressen har registrerats av en av våra kunder. Om det inte är du som har registrerat dig som kund hos oss så kan du e-posta ' . STORE_OWNER_EMAIL_ADDRESS . '.' . "\n"); ?> Please help me... Thx
Party Posted March 6, 2007 Author Posted March 6, 2007 I have tryid to change the %s to %f but that do not work. Any one have any idea.??? :'(
ErollorD Posted March 6, 2007 Posted March 6, 2007 well if you also have gender in your registration for, then it gets the surname otherwise it inlcudes only name. If you want to change this, got to create_account.php and find: if (ACCOUNT_GENDER == 'true') { if ($gender == 'm') { $email_text = sprintf(EMAIL_GREET_MR, $lastname); } else { $email_text = sprintf(EMAIL_GREET_MS, $lastname); } } else { $email_text = sprintf(EMAIL_GREET_NONE, $firstname); } Now here you see, that if gender is set to true, then it will include surname, other only name. So you only change and replace this with new code: if (ACCOUNT_GENDER == 'true') { if ($gender == 'm') { $email_text = sprintf(EMAIL_GREET_MR, $firstname); } else { $email_text = sprintf(EMAIL_GREET_MS, $firstname); } } else { $email_text = sprintf(EMAIL_GREET_NONE, $firstname); } and this should work...
Party Posted March 6, 2007 Author Posted March 6, 2007 Hi Again and thx for you reply. I open the create_account.php file define('TEXT_ORIGIN_LOGIN', '<font color="#FF0000"><small><b>OBS:</b></font></small> Om du redan har ett konto hos oss, vänligen logga in på <a href="%s"><u>den här sidan</u></a>.'); define('EMAIL_SUBJECT', 'Välkommen till ' . STORE_NAME); define('EMAIL_GREET_MR', 'Hej Herr. %s,' . "\n\n"); define('EMAIL_GREET_MS', 'Hej Fru. %s,' . "\n\n"); define('EMAIL_GREET_NONE', 'Hej %s' . "\n\n"); define('EMAIL_WELCOME', 'Välkommen till <b>' . STORE_NAME . '</b>.' . "\n\n"); I can not find that you wrote: if (ACCOUNT_GENDER == 'true') { if ($gender == 'm') { $email_text = sprintf(EMAIL_GREET_MR, $lastname); } else { $email_text = sprintf(EMAIL_GREET_MS, $lastname); } } else { $email_text = sprintf(EMAIL_GREET_NONE, $firstname); } am i missing something here? thx
ErollorD Posted March 9, 2007 Posted March 9, 2007 you are checking in includes/languages/YOURLANGUAGE folder, you should find this in the file located in the root..
Party Posted March 13, 2007 Author Posted March 13, 2007 THX......IT WORKS Your are the best..... if you have the time can you look at this one... http://www.oscommerce.com/forums/index.php?sho...=253904&hl= Thx... again..
Recommended Posts
Archived
This topic is now archived and is closed to further replies.