Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Hide login box after logged in?


wangchao

Recommended Posts

Hi, Gurus,

 

 

I have someone tailed a template for me. Now it is time for a computer dummy to maintain and even to make some modification. It is HARD...

 

My website is at http://www.esilk.biz/ What I am unsatisfy with is the email login box. It sounds greate for visitor's first impression. However, it looks a bit stupid after the visitor actually logged in. A user who is logged in will ask himself how could this happen after he has already logged in? As this could arouse some sort of negative psychological effects, I'd like to hide it after the user is logged in. At the place where the login box was, I'd like to replace it with some nice strings like "Welcome Smith, you have logged in, click here to log out, blah, blah.".

 

I went into the code and found the loginbox are programmed as I attached below.

 

I know the function to be called like this

=====

if (tep_session_is_registered('customer_id')) {

 

)

else

{

 

}

=====

 

But in the code below, it is a little bit difficult to replace all those <?php> pieces one by one. There must be some easier way to do this than doing it piece by piece.

 

Can someone teach me???

 

 

 

Thank you very much

Wang Chao

 

 

 

 

 

 

 

<-------contents of loginbox.php of my website>

<?php echo tep_draw_form('login', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL')); ?>

<table border="0" cellpadding="0" cellspacing="0" class="headerNavigation2">

<tr align="center" valign="middle">

<td class="headerNavigation2">Email:</td>

<td class="headerNavigation2"><img src="http://www.esilk.biz/catalog/images/main_images/light.gif" width="4" height="1"></td>

<td class="headerNavigation2"><?php echo tep_draw_input_field('email_address'); ?></td>

<td class="headerNavigation2"><img src="http://www.esilk.biz/catalog/images/main_images/light.gif" width="10" height="1"></td>

<td class="headerNavigation2">PIN:</td>

<td class="headerNavigation2"><img src="http://www.esilk.biz/catalog/images/main_images/light.gif" width="4" height="1"></td>

<td class="headerNavigation2"><?php echo tep_draw_password_field('password'); ?></td>

<td class="headerNavigation2"><img src="http://www.esilk.biz/catalog/images/main_images/light.gif" width="10" height="1"></td>

<td class="headerNavigation2"><?php echo tep_image_submit('button_quick_find.gif', IMAGE_BUTTON_LOGIN); ?></td>

<td class="headerNavigation2"><img src="http://www.esilk.biz/catalog/images/main_images/light.gif" width="40" height="1"></td>

<td class="headerNavigation2"><a href="<?php echo tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation2">Register</a></td>

<td class="headerNavigation2"><img src="http://www.esilk.biz/catalog/images/main_images/light.gif" width="40" height="1"></td>

<td class="headerNavigation2"><?php echo '<a href="' . tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') . '" class="headerNavigation2">Forgot PIN</a>'; ?></td>

<td class="headerNavigation2"><img src="http://www.esilk.biz/catalog/images/main_images/light.gif" width="60" height="1"></td>

<td class="headerNavigation2"><?php echo '<a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . tep_image(DIR_WS_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '</a>' ?></td>

<td class="headerNavigation2"><img src="http://www.esilk.biz/catalog/images/main_images/light.gif" width="10" height="1"></td>

<td class="headerNavigation2"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_checkout.gif', HEADER_TITLE_CHECKOUT) . '</a>'; ?></td>

</tr>

</table></form>

-David Wang

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...