MrVH Posted May 10, 2007 Share Posted May 10, 2007 Hi guys. I've been running an OSCommerce site for a client of mine for about 5 years. They recently called me about doing a site upgrade... sure I said, and it would be a good time to upgrade the OSC software. Ouch. Things seemed to be going fine. I upgrade, and started implementing my design customizations. I had thought everything was fine until I tried signing up as a new customer and purchasing a product. When going through the process and creating a new account, everything seems fine through the account signup process... then it enters the cart again and the shipping address only has a comma , showing. If I then try to edit the address everything is fine until I try to continue... I get this error... ============================ 1062 - Duplicate entry '1-995' for key 1 insert into address_book (customers_id, entry_firstname, entry_lastname, entry_street_address, entry_postcode, entry_city, entry_country_id, entry_company, entry_zone_id, entry_state) values ('995', 'Joe', 'Van Test', '123 NEW Test Street', 'V1V 1V1', 'Edmonton', '38', 'JoeTest Inc', '67', '') [TEP STOP] ============================ I have read and read and read and searched through the forums here, I can not find an answer which fixes the problem. I ALSO tried a clean install (with none of my additions, but the upgraded DB) and I STILL get the error. Thanks for ANY help. MrVH Link to comment Share on other sites More sharing options...
MrVH Posted May 10, 2007 Author Share Posted May 10, 2007 As an addition to the above, I've noted that if I go into the admin and try to Edit or Delete the customer I get the following error at the top of the page... Warning: reset() [function.reset]: Passed variable is not an array or object in /home/centent/public_html/catalogTEST/admin/includes/classes/object_info.php on line 17 Warning: Variable passed to each() is not an array or object in /home/centent/public_html/catalogTEST/admin/includes/classes/object_info.php on line 18 Remember, again, that this is an unmodified test install, it's a bare upgrade of the older OSC to the newest version. Anyone have a clue? :) MrVH Link to comment Share on other sites More sharing options...
MrVH Posted May 10, 2007 Author Share Posted May 10, 2007 Ok, here's some more information... if I log into one of the NEW accounts I've created that give the previously reported errors, and I go into their address book, their PRIMARY ADDRESS is shown as a comma ( , ) BUT the real address I originally had typed in is in the address book! If I then edit the address and select it as the PRIMARY address, WALLA! Everything works fine! So somehow, the address entered in at time of account creation is not being set as the primary address by default. Where can I make this change? Where is this set? In the DB? In the php of the actual pages? Many thanks for your help. MrVH Link to comment Share on other sites More sharing options...
oschellas Posted May 10, 2007 Share Posted May 10, 2007 Its a problem in the database, check if address_book_id is set to auto_increment in the address_book table. Link to comment Share on other sites More sharing options...
MrVH Posted May 10, 2007 Author Share Posted May 10, 2007 YES! That did it. It wasn't set to auto_increment, now it is and it works perfectly! Excellent! Thanks so much! MrVH Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.