Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Login problem


stephaniea

Recommended Posts

I have been looking at other forums to see if i can get any help with this. Here is my problem:

 

I use this code :

 

<?php

if (tep_session_is_registered('customer_id'))

{ ?>

<?php echo'<a href="' . tep_href_link(FILENAME_LOGIN, '', 'SSL') . '">' . '</a>'?>

<?php

} else {

?>

<?php echo'<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '">' . '</a>'; } ?>

 

to create a logoff/login button. however, my page doesn't show LogIn at all. If you click check out, it will take you to the login page and once you log in, it shows the logoff button. But for the life of me, i can't figure out why Login won't show. Please help. I would very much appreciate it.

 

Thanks

Link to comment
Share on other sites

If you click check out, it will take you to the login page and once you log in, it shows the logoff button

 

It's programmed to show a Logoff button if you're logged in, and a Login button if you're logged off.

 

You don't want both at the same time.

:blush:

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

It's programmed to show a Logoff button if you're logged in, and a Login button if you're logged off.

 

You don't want both at the same time.

:blush:

 

I know, but when you're logged off, it doesn't show a login button. why?

Link to comment
Share on other sites

Try this instead:

 

<?php
if ( tep_session_is_registered('customer_id') ) { 
 echo'<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '">' . '</a>';
}
else {
 echo'<a href="' . tep_href_link(FILENAME_LOGIN, '', 'SSL') . '">' . '</a>';
}
?>

 

Looks like you have them backwards to me.

:blush:

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

Try this instead:

 

<?php
if ( tep_session_is_registered('customer_id') ) { 
 echo'<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '">' . '</a>';
}
else {
 echo'<a href="' . tep_href_link(FILENAME_LOGIN, '', 'SSL') . '">' . '</a>';
}
?>

 

Looks like you have them backwards to me.

:blush:

 

 

It seems like no matter what I do to header.php, nothing happens. I can't figure it out. I'm trying to change some stuff in the sts_display_output.php, but nothing is working yet.

Link to comment
Share on other sites

sts_display_output.php looks to be part of the Simple Template System to me.

 

You have that installed (or are trying) correct?

:unsure:

 

Maybe header.php isn't used with that mod...

 

What are you trying to change in sts_display_output.php?

:unsure:

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

nevermind...i figured it out...in the sts_display_template.php, I put in an if statement similar to the one above but replaced

 

$template['breadcrumbs'] = $breadcrumb->trail(' » ');
if (tep_session_is_registered('customer_id')) {

 

WITH:

 

if (tep_session_is_registered('customer_id')) {

  $template ['steph_login' = '<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '" class="headerNavigation">' . HEADER_TITLE_LOGOFF . '</a>';
}
else {
  $template['steph_login' = '<a href="' . tep_href_link(FILENAME_LOGIN, '', 'SSL') . ' " class="headerNavigation">' . HEADER_TITLE_LOGIN . '</a>';
}

if (tep_session_is_registered('customer_id')) { ....

 

the variables ('steph_login') can be whatever you want, as long as they are not declared anywhere else and they have to be the same. It worked for me

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...