Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to change format of "log yourself in" link.


philip56

Recommended Posts

I would like to change the format of the "log yourself in" and "create an account" links on the main shop page but can't find the right file to edit. I've looked in what I think are the obvious ones.

 

Can anyone help?

 

Thanks

 

Philip

Link to comment
Share on other sites

index.php refers the function tep_customer_greeting:

<td class="main" align="center"><?php echo tep_customer_greeting(); ?></td>

This is a found in /catalog/includes/functions/general.php

////
// Return a customer greeting
 function tep_customer_greeting() {
global $customer_id, $customer_first_name;

if (tep_session_is_registered('customer_first_name') && tep_session_is_registered('customer_id')) {
  $greeting_string = sprintf(TEXT_GREETING_PERSONAL, tep_output_string_protected($customer_first_name), tep_href_link(FILENAME_PRODUCTS_NEW));
} else {
  $greeting_string = sprintf(TEXT_GREETING_GUEST, tep_href_link(FILENAME_LOGIN, '', 'SSL'), tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'));
}

return $greeting_string;
 }

////

 

The calls in this code are to the /catalog/includes/languages/english.php file:

define('TEXT_GREETING_PERSONAL', 'Welcome back <span class="greetUser">%s!</span> Would you like to see which <a href="%s"><u>new products</u></a> are available to purchase?');
define('TEXT_GREETING_PERSONAL_RELOGON', '<small>If you are not %s, please <a href="%s"><u>log yourself in</u></a> with your account information.</small>');
define('TEXT_GREETING_GUEST', 'Welcome <span class="greetUser">Guest!</span> Would you like to <a href="%s"><u>log yourself in</u></a>? Or would you prefer to <a href="%s"><u>create an account</u></a>?');

 

Capice?

 

God luck,

V6 :thumbsup:

Link to comment
Share on other sites

index.php refers the function tep_customer_greeting:

<td class="main" align="center"><?php echo tep_customer_greeting(); ?></td>

This is a found in /catalog/includes/functions/general.php

////
// Return a customer greeting
 function tep_customer_greeting() {
global $customer_id, $customer_first_name;

if (tep_session_is_registered('customer_first_name') && tep_session_is_registered('customer_id')) {
  $greeting_string = sprintf(TEXT_GREETING_PERSONAL, tep_output_string_protected($customer_first_name), tep_href_link(FILENAME_PRODUCTS_NEW));
} else {
  $greeting_string = sprintf(TEXT_GREETING_GUEST, tep_href_link(FILENAME_LOGIN, '', 'SSL'), tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'));
}

return $greeting_string;
 }

////

 

The calls in this code are to the /catalog/includes/languages/english.php file:

define('TEXT_GREETING_PERSONAL', 'Welcome back <span class="greetUser">%s!</span> Would you like to see which <a href="%s"><u>new products</u></a> are available to purchase?');
define('TEXT_GREETING_PERSONAL_RELOGON', '<small>If you are not %s, please <a href="%s"><u>log yourself in</u></a> with your account information.</small>');
define('TEXT_GREETING_GUEST', 'Welcome <span class="greetUser">Guest!</span> Would you like to <a href="%s"><u>log yourself in</u></a>? Or would you prefer to <a href="%s"><u>create an account</u></a>?');

 

Capice?

 

God luck,

V6 :thumbsup:

 

Sorry for the delay in saying thank you for this comprehensive answer. I posted last night just before going to bed.

 

That was extremely helpful. Thank you very much.

 

Kind regards

 

Philip

Link to comment
Share on other sites

Sorry for the delay in saying thank you for this comprehensive answer. I posted last night just before going to bed.

 

That was extremely helpful. Thank you very much.

 

Kind regards

 

Philip

 

Following Jason's excellent advice, I have managed to change the font styles and colours of the links as I wanted to. However the mouse hover colour set in stylesheet.css no longer operates.

 

Does anyone know how to correct this?

 

Thanks in anticipation.

 

Philip

Link to comment
Share on other sites

Following Jason's excellent advice, I have managed to change the font styles and colours of the links as I wanted to. However the mouse hover colour set in stylesheet.css no longer operates.

 

Does anyone know how to correct this?

 

Thanks in anticipation.

 

Philip

 

 

Can anyone help please?

 

Regards

 

Philip

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...