Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

retaining osCommerce login sessions and sessions from main site login


PHP_User

Recommended Posts

Our site has a customer login (to an extensive MySQL database) and the osCommerce login for the store. We had a contract programmer help us with keeping our log in session data and the osCommerce session data intact so users do not have to login to both systems. Unfortunately, he is no longer available, and with the various update we have done to both the main site, and OsCommerce, the login data is being lost.

 

When someone signs up at our site (either in the cart or on the main site), we create an OsCommerce record using the standard database, and populate our database as well. I know this is redundant, but with our limited staff, and the amount of data we store on the main site, it is not feasible at the moment to merge them. That is high on our list of to do's, but this needs addressed at the moment.

 

When someone signs up, we take the osCommerce customer ID and insert into our contact table, so we can relate the 2 databases. On our main site we use $_SESSION['ContactId'] for their session variable. From what I can tell, osCommerce uses tep_session_register('customer_id'), for the oscId.

 

Our main site uses session_start() in the header include, so the entire site holds our session variable. I added session_start() to the application_top.php page, and when I log into our site, and go the the shopping cart, my ContactId is retained. But, I cannot keep the OsCommerce login if I come from the main site, then go to OsC, or login with OsC, go to the main site, and come back.

 

I am not sure why I cant keep the osCommerce customer id. I have been reading a lot of posts about this, but I have not been able to find a solution.

 

Regards,

Don

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...