Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Expert PHP coders pls help


chrisnasah

Recommended Posts

Hi i need urgent help, someone pls help.

 

In my catalog/includes/header: I have a code that display various stuff and all.

 

I have a option there that says "customer Login" which is perfect.

 

What i want it to show is the "customer login" to change to "customer logoff" when someone is actually logged in.

 

I know i need some kind of if statement or something etc etc

 

Can soomeone pls help urgently!!!!!!!

Link to comment
Share on other sites

Below is the header.php code need help creating a if statement so the above works, tried quite alot but not so good with php and just struggled.

 

i need to add something like:

 

if ( tep_session_is_registered('customer_id') ) { etc etc

 

 

<tr><td><img src=images/m12.gif width=3 height=3 align=absmiddle>   <a href=<?=tep_href_link('login.php')?> class=ml1>Customer Login</a></td></tr>

<tr><td height=12></td></tr>

<tr><td><img src=images/m14.gif width=127 height=1></td></tr>

<tr><td height=4></td></tr>

<tr><td><b><font color=#000000>currensies</font></b></td></tr>

Link to comment
Share on other sites

Try this:

 

<tr><td><img src=images/m12.gif width=3 height=3 align=absmiddle>   
<?php if (tep_session_is_registered('customer_id')) {
 echo '<a href="';
 echo tep_href_link(FILENAME_LOGOFF);
 echo '">Customer Logout</a>';
} else {
 echo '<a href="';
 echo tep_href_link(FILENAME_LOGIN);
 echo '">Customer Login</a>';
}?>
</td></tr>
<tr><td height=12></td></tr> 
<tr><td><img src=images/m14.gif width=127 height=1></td></tr> 
<tr><td height=4></td></tr> 
<tr><td><b><font color=#000000>currensies</font></b></td></tr>

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...