Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

customer logs out, but the shopping cart remains?


Recommended Posts

Hi -


I've customized my oscommerce site pretty heavily, and am now trying to finalize the login/logout procedure.


I've got a little login bit in the header that goes like this:


// if session hasn't started yet, display a link to the login page
if (!tep_session_is_registered('customer_id')) {
 echo '<a href="' . tep_href_link(FILENAME_LOGIN) . '">view my account</a>';

// if session is already started, list account options
elseif (tep_session_is_registered('customer_id')) {
include (DIR_WS_MODULES . 'header-login.php');


and header-login.php is just a table:


<table border="0">
 <td class="small" align="right"><a href="<? echo tep_href_link(FILENAME_ACCOUNT); ?>">view my account</a></td>
 <td class="small" align="right"><a href="<? echo tep_href_link(FILENAME_ACCOUNT_HISTORY); ?>">view my order history</a></td>
 <td class="small" align="right"><a href="<? echo tep_href_link(FILENAME_LOGOFF); ?>">sign out</a></td>


This works as it should - "view my account" displays when I'm logged out, and the other options display after I log in; and "sign out" signs me out.


But no matter what I do, my shopping cart displays. I don't want the cart to display when I've logged out! If I log out, shouldn't all knowledge of my shopping cart go away as well?


Any assistance is greatly appreciated -



Link to comment
Share on other sites

Well, never mind. Additional testing has failed to recreate this little problem. Maybe it was a browser caching issue, or temporary insanity or something like that.



Link to comment
Share on other sites


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

  • Create New...