Results 1 to 10 of 15

Hybrid View

  1. #1
    Join Date
    Nov 2011
    Posts
    121
    Plugin Contributions
    0

    Default New customer account generates error

    ZC 1.3.9h

    When I tried to test my new store with the first order by creating a new customer account I received this error:

    1062 Duplicate entry '3' for key 1
    in:
    [insert into customers_info (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created, customers_info_date_of_last_logon) values ('3', '1', now(), now())]

    Any ideas? (it may have something to do with the Master Password addon) Thanks.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: New customer account generates error

    What exactly do you mean by "my new store"?

    The only reason you'd get a "duplicate entry" error on the "customers_info" table is if you had previously had customers in your store, and then manually went into the database and hacked out records from the "customers" table, and didn't also clean up the several ADDITIONAL tables that also contain related customer data.
    Same thing happens if you create a new database and try to "pick and choose" selected tables to copy over instead of copying EVERYTHING.

    So ... what's the history behind how you got to where you're at right now?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,511
    Plugin Contributions
    126

    Default Re: New customer account generates error

    A couple of people have gotten into this pickle. It will occur when you hand add or delete records from customers or customer info.

    If you're *in* this situation. your best bet would be to add records to customer_info and/or customers table until they have the same which match the records in the customers table; you probably tried to add to customers without adding to customer_info.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  4. #4
    Join Date
    Nov 2011
    Posts
    121
    Plugin Contributions
    0

    Default Re: New customer account generates error

    Quote Originally Posted by swguy View Post
    A couple of people have gotten into this pickle. It will occur when you hand add or delete records from customers or customer info.

    If you're *in* this situation. your best bet would be to add records to customer_info and/or customers table until they have the same which match the records in the customers table; you probably tried to add to customers without adding to customer_info.
    I checked both tables and all records match between the customers and the customers_info table (there are only 3 customers records, 1 is actual, 2 are test customers). I do not know how to add records to individual table as of yet.

    Thanks for all the replies, maybe we can find a solution soon.

  5. #5
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,511
    Plugin Contributions
    126

    Default Re: New customer account generates error

    It's not the count, it's the first column - the key - that you need to tell us about.

    One must be greater than the other if you're getting that error.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  6. #6
    Join Date
    Nov 2011
    Posts
    121
    Plugin Contributions
    0

    Default Re: New customer account generates error

    The first column is the customer_info_id, and each id is unique and increments by 1 each time a new customer account is created.
    I have tried deleting all the customers from the admin-csutomers panel and verified that there are 0 records, the error still persist when creating a new customer and the customer_id / customer_info_id will continue to increment instead of starting over at 0.

    If you need any other info, let me know, thanks.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Picture 1.png 
Views:	81 
Size:	16.2 KB 
ID:	9989   Click image for larger version. 

Name:	Picture 2.jpg 
Views:	71 
Size:	6.0 KB 
ID:	9990  

  7. #7
    Join Date
    Nov 2011
    Posts
    121
    Plugin Contributions
    0

    Default Re: New customer account generates error

    Quote Originally Posted by DrByte View Post
    What exactly do you mean by "my new store"?

    So ... what's the history behind how you got to where you're at right now?
    I Just finished setting up all the products in the shopping cart on my site and getting ready to go online. I had created a test customer account initially to test the cc payment gateway and order e-mail function. I then deleted this test customer account from the Admin-Customer panel. I then tried to enter an actual customer order and received this error when I was creating her account. From that point, I tried to create another 2 test customer accounts and the error was encountered each time (only difference is the customer id will increment by 1).
    The interesting part is I did not manually hack into the database to alter the records in anyway (I don't even know how to). The customer deletion was done through Admin-Customers panel and customer account creation was done through the shopping cart front end.

    I have gone into myPHPadmin to look at the records in the customers and customers_info tables, they both match. Interestingly enough, although the error is generated, the new customer accounts are created with all the right info. I can close the browser reopen another and log into the newly created account with no problems. This is very baffling since the error is comlplaining about a duplicate for a new record (I can understand if there is an existing record of the same id, hence the duplicate but therer isn't)

 

 

Similar Threads

  1. v150 New Customer Account Creation page is giving error...
    By anandbir in forum General Questions
    Replies: 1
    Last Post: 18 May 2012, 01:26 PM
  2. Purchase Generates a New Password
    By JimN000 in forum General Questions
    Replies: 4
    Last Post: 19 Oct 2010, 05:41 AM
  3. New Customer Account Problem
    By julia44 in forum Managing Customers and Orders
    Replies: 18
    Last Post: 19 May 2007, 02:00 AM
  4. Error deleting customer account
    By baschwar in forum Managing Customers and Orders
    Replies: 0
    Last Post: 13 Jun 2006, 06:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg