aegrnberg Posted December 12, 2006 Posted December 12, 2006 Hi I can't seem to figure out what I did wrong. My test store is heavily moded with at least 30 mods! I've tried to install and uninstall the mods that I think *might* have done it... to no avail... maybe I missed something: active countries v2.0 - 060608 date of birth pulldown v2.1.1 - 060323 login page a la amazon v1.4 - 060203 shipdate v2.3 - 061108 meta tag controller v1.2 - 061129 I've also searched for the answers in the forum and contribs, but could not find any. Here's my problem. When I create an account the address book and customer info works fine. But when I log out and log back in, the address book is blank. Let's say I created an account with customer_id "1". The database seems to be fine as long as that customer is logged in for the first time upon creating an account. The problem seems to be that when I log out, I can log back in but the store recognizes me as customer_id "0" for some reason and so the address book does not show. However, while logged in as customer_id "0" and add info to my customer info and addressbook, they are saved under customer_id "0" in the addressbook.... So, regardless of the initial customer_id, any subsequent information submitted by a customer, after they've logged back out the first time and logged back in, fall under customer_id "0" and they ALL see those same addresses because technically they all logged in as customer_id "0" regardless of their e-mail/pwd... I'm baffled how it would even let me log in in the first place...? The real addresses submitted when signing up never show up... where in the code did I mess up the part where it calls up the original customer_id so that the correct address book listings show up?? Any help would be greatly appreciated.
aegrnberg Posted December 13, 2006 Author Posted December 13, 2006 Hi I can't seem to figure out what I did wrong. My test store is heavily moded with at least 30 mods! I've tried to install and uninstall the mods that I think *might* have done it... to no avail... maybe I missed something: active countries v2.0 - 060608 date of birth pulldown v2.1.1 - 060323 login page a la amazon v1.4 - 060203 shipdate v2.3 - 061108 meta tag controller v1.2 - 061129 I've also searched for the answers in the forum and contribs, but could not find any. Here's my problem. When I create an account the address book and customer info works fine. But when I log out and log back in, the address book is blank. Let's say I created an account with customer_id "1". The database seems to be fine as long as that customer is logged in for the first time upon creating an account. The problem seems to be that when I log out, I can log back in but the store recognizes me as customer_id "0" for some reason and so the address book does not show. However, while logged in as customer_id "0" and add info to my customer info and addressbook, they are saved under customer_id "0" in the addressbook.... So, regardless of the initial customer_id, any subsequent information submitted by a customer, after they've logged back out the first time and logged back in, fall under customer_id "0" and they ALL see those same addresses because technically they all logged in as customer_id "0" regardless of their e-mail/pwd... I'm baffled how it would even let me log in in the first place...? The real addresses submitted when signing up never show up... where in the code did I mess up the part where it calls up the original customer_id so that the correct address book listings show up?? Any help would be greatly appreciated. Never mind... I figured it out. With the "login page a la Amazon", I overwrote this line in the login.php file: // Check if email exists //rmh M-S_pricing edited next line $check_customer_query = tep_db_query("select customers_id, customers_groups_id, customers_firstname, customers_password, customers_email_address, customers_default_address_id from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'"); When copying the code, make sure the above line remains intact within the body of the code. For extra peace of mind I also implented suggestions from this thread: http://www.oscommerce.com/forums/index.php?sho...=241614&hl=
aegrnberg Posted December 13, 2006 Author Posted December 13, 2006 For extra peace of mind I also implented suggestions from this thread: whoops, implented = implemented
aegrnberg Posted December 13, 2006 Author Posted December 13, 2006 I've posted this fix in the "login a la Amazon" contrib page for those with a muti-store/multi-shop version. http://www.oscommerce.com/community/contributions,2073
Recommended Posts
Archived
This topic is now archived and is closed to further replies.