Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

login page


JB04

Recommended Posts

Posted

How would i make it so i could not display something whenever a user is logged in, i already have the code, if tep session is registered, that piece, however i'm new to this so cannot work it out, is there an opposite so i can make some text disappear whenever the user log's in, for instance when the user is on the main page and already logged in a session it would give different info to them while hiding the text which was there on the main page before to unregistered users, sort of vica versa thing,

 

Ta

Muchas gracious

Posted
How would i make it so i could not display something whenever a user is logged in, i already have the code, if tep session is registered, that piece, however i'm new to this so cannot work it out, is there an opposite so i can make some text disappear whenever the user log's in, for instance when the user is on the main page and already logged in a session it would give different info to them while hiding the text which was there on the main page before to unregistered users, sort of vica versa thing,

 

Ta

Muchas gracious

 

 

well, I use this for instance:

 

<?php if ((!tep_session_is_registered('customer_id'))) {?>

 

<tr>

<td class="main"><?php include(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFINE_MAINPAGE); ?></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<?php } ?>

Treasurer MFC

Posted

Ye, sort of, I mean the opposite like:

 

if session is registered

display this

 

if session is not registered

display this instead

 

I've benn trying to work out a little script but keep failing

Posted
Ye, sort of, I mean the opposite like:

 

if session is registered

display this

 

if session is not registered

display this instead

 

I've benn trying to work out a little script but keep failing

 

well, that is what this does, if the customer id NOT logged in, I display the main text.

otherwise I don't.

Treasurer MFC

Posted

Ideal setup would be for example the login link, and logoff link, display one when logged in and the other when not, i need to be able to extend this to other areas but cannot find the code?

I need to remove some text when not registered and display some other when not, the above example is not sufficent.

Thanks anyway

Posted

Hello!

 

How can I use a different login page what redirect to admin site? I can't use the apache .htacces the on my internet server.

 

The AdminLogin0.0.6 solve this problem?

 

Regards

Zsolt

Posted

I've sorted it so decided to post it here for others, i find it helpful for displaying different content to users logged in & users not logged in, place this wherever you need it:

 

<?php
if (tep_session_is_registered('customer_id')) { ?>
<?php 
// display something to registered users
echo 'Type some words etc here to display to registered users'; ?>

<?php
 } else {
?>
<?php 
// display something to everyone else
echo 'Type some words etc here to display to everyone else'; ?>
<?php
}
?>

 

Hope this is useful to some others aswell

Archived

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

×
×
  • Create New...