Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to change Surname to first name in create_account.php


Party

Recommended Posts

Posted

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

Posted

I have tryid to change the %s to %f but that do not work.

 

Any one have any idea.??? :'(

Posted

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...

Posted

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

Posted

you are checking in includes/languages/YOURLANGUAGE folder, you should find this in the file located in the root..

Archived

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

×
×
  • Create New...