Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

integrating log in/out button with web site outside osCommerce


smelly

Recommended Posts

Hello! I'm working on a site that has an osCommerce install in /store. I've got a header that goes across all the pages (including but not limited to the osCommerce install) upon which I'd like to put a log in/log out button. Step one was to discern how osCommerce tells if a user is logged in or not. Some print statements in store/index.php showed the presence of variables like $_SESSION['customer_id'] and the session cookie ($_COOKIE['osCsid']), so I went over to /index.php, but there were neither session variables nor cookie. Browser settings indicated that the cookie was still present, just not being detected by /index.php. I Googled for a little while, but didn't find anything helpful. The closest I found in this forum was this, but it's still totally useless to me.

 

I didn't see any other posts like this, but this forum is pretty active. If this is a constantly-asked question, I apologize and hope you will send me in the direction of its previous incarnations. Thanks for your help.

Link to comment
Share on other sites

I found this, which is a discussion about detecting if users are logged in or not, and at the bottom, someone provides the snippet "(!tep_session_is_registered('customer_id'))" This always returns false, and a similar function, tep_session_id always returns true when there's a start_session() at the top of the page (as it should, since start_session creates an id, and tep_session_id returns it).

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...