Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to remove "Welcome guest"


richlewt

Recommended Posts

Hi

I have just added a login box in columnright.php and wish to remove the line from index.php (at least thats where I think it is) that says "Welcome guest would you like to login............" but cant seem to see where it is. Anyone tell me please?

thanks

Rich

"May the seam be with you"

Link to comment
Share on other sites

catalog/includes/english.php about line 299

 

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>?');

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Hi

Thanks for that. What I now wish to do is add the standard "would you prefer to CREATE A NEW PROFILE?" line into the bottom of the login box in the right hand column. I have tried pasting it in but when you click on the link it does not go anywhere. I have included my loginbox.php below:

 

?>

<!-- loginbox //-->

 

 

<?php

if (!tep_session_is_registered('customer_id')) {

?>

<tr>

<td>

<?php

 

$info_box_contents = array();

$info_box_contents[] = array('align' => 'left',

'text' => BOX_LOGINBOX_HEADING

);

new infoBoxHeading($info_box_contents, false, false);

$loginboxcontent = "

<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">

<form name=\"login\" method=\"post\" action=\"" . tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL') . "\">

<tr>

<td align=\"left\" class=\"main\">

" . BOX_LOGINBOX_EMAIL . "

</td>

</tr>

<tr>

<td align=\"left\" class=\"main\">

<input type=\"text\" name=\"email_address\" maxlength=\"96\" size=\"20\" value=\"\">

</td>

</tr>

<tr>

<td align=\"left\" class=\"main\">

" . BOX_LOGINBOX_PASSWORD . "

</td>

</tr>

<tr>

<td align=\"left\" class=\"main\">

<input type=\"password\" name=\"password\" maxlength=\"40\" size=\"20\" value=\"\"

</td>

</tr>

<tr>

<td class=\"main\" align=\"center\">

" . tep_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN) . "

</td>

</tr>

<tr><td align=\"left\" class=\"main\">

" . TEXT_GREETING_LOGINBOX . "

</td></tr>

</form>

</table>

";

 

$info_box_contents = array();

$info_box_contents[] = array('align' => 'center',

'text' => $loginboxcontent

);

new infoBox($info_box_contents);

?>

</td>

</tr>

 

 

 

<?php

}

else

{

// If you want to display anything when the user IS logged in, put it

// in here... Possibly a "You are logged in as :" box or something.

}

?>

<!-- loginbox_eof //-->

 

Do I need to link back somehow to the catalog/includes/languages/english.php file somehow?

thanks

Rich

"May the seam be with you"

Link to comment
Share on other sites

I could help more if I could see the code that's not working, but essentially you need to replace the %s with tep_href_link, something like

<a href=\"" .  tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL') . "\">text to display</a>

Hth,

Matt

Link to comment
Share on other sites

Hi

I have tried various lines but can still not get the standard "Welcome guest would you like to create an account line" to appear at the bottom of the loginbox.

My latest attempt was to take the loginbox.php file listed above and add the following near the end:

<tr><td align=\"left\" class=\"main\">

 

<?php echo sprintf(TEXT_GREETING_LOGINBOX, tep_href_link(FILENAME_LOGIN, '', 'SSL'), tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL')); ?>

</td></tr>

 

</form>

</table>

 

Then in catalog/includes/languages/english.php I have the following define:

define('TEXT_GREETING_LOGINBOX', 'Welcome <span class="greetUser">Guest!</span> Would you like to <a href="%s"><u><b>LOG YOURSELF IN</B></u></a>? Or would you prefer to <a href="%s"><u><b>CREATE A NEW PROFILE</b></u></a>?');

 

Can anyone see the obvious mistake? With the above i am seeing no greeting message at all.

thanks

Rich

"May the seam be with you"

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...