Forums / Managing Customers and Orders / Duplicate customer IDs in zen_address_book table

Duplicate customer IDs in zen_address_book table

Locked

Views: 1,153

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
23 Apr 2010, 6:20 PM
#1
dcdiaz avatar

dcdiaz

New Zenner

Join Date:
Jan 2010
Posts:
4
Plugin Contributions:
0

Duplicate customer IDs in zen_address_book table

Upon browsing my zen_address_book table in my database, I've discovered that there are several duplicate customer IDs, and they're associated with entirely different customers with entirely different names and different addresses.

Some of these duplicate customer IDs date back to several years ago when I first installed and began to use ZenCart. I don't recall which version of ZC I began with.

To investigate this further on my own, I cross-referenced the zen_customers table, and I see that those duplicate customer IDs I saw in the zen_address_book table are only listed once and associated with only one of the multiple customer names and addresses.

Is this normal?? If not, why does this occur?

I'm intentionally not posting my URL, because I don't think it's necessarily relevant to this issue. However, if I'm wrong in assuming that, please just let me know, and I'll post my URL.

Thank you in advance for your time and help. I look forward to your reply.

23 Apr 2010, 6:59 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Duplicate customer IDs in zen_address_book table

What you describe only happens when someone decides to manually hack out customer data by emptying the "customers" table but doesn't pay attention to also needing to empty the address_book table (and customers_info table in v1.x.x sites). Thus, new customers end up getting extra address-book entries tied to them unexpectedly because of the old data already in the table.

.
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.

24 Apr 2010, 12:37 AM
#3
dcdiaz avatar

dcdiaz

New Zenner

Join Date:
Jan 2010
Posts:
4
Plugin Contributions:
0

Re: Duplicate customer IDs in zen_address_book table

DrByte,

Thank you very much for your speedy reply. What you explained, generally, does makes sense. However, if my original developer really did what you suggested, then wouldn't ALL of my initial customers have duplicates? Perhaps I should have clarified that the duplicates I see are fairly random and only occur, perhaps, 3-5 customers out of 100. In any case, I don't suppose there's an easy fix for those existing duplicates, so I guess I'll just live with it. Thanks so much, again, for you reply -- much appreciated.

24 Apr 2010, 3:26 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Duplicate customer IDs in zen_address_book table

I should clarify another scenario: By default Zen Cart allows customers to enter up to 5 addresses as part of their account profile. Those addresses get added to the address_book table.
So, the "duplicates" you see could actually be legitimate additional addresses supplied by your customers, perhaps as alternate shipping destinations for sending gifts, etc.

If you wish to limit the number of addresses your customers can enter, you can change that setting under Admin->Configuration->Maximum Values

.
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.

24 Apr 2010, 3:29 PM
#5
dcdiaz avatar

dcdiaz

New Zenner

Join Date:
Jan 2010
Posts:
4
Plugin Contributions:
0

Re: Duplicate customer IDs in zen_address_book table

DrByte,

Hmmm, yes, I knew about the multiple addresses, and I see many of those that have the exact same name, but just different addresses. But the ones I was concerned about were those that had entirely different first and last names assigned to the same customer ID. Are you saying that also could be normal within that scenario? Thanks.

24 Apr 2010, 4:01 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Duplicate customer IDs in zen_address_book table

Any response to that would be purely speculation on my part.

Without having access to your backup data from way back, without knowing "when" those addresses appeared, without knowing whether those customers intended to add those themselves, etc, I can't give you a definitive answer. You alone have the information and resources to evaluate the matter best.

.
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.

24 Apr 2010, 4:59 PM
#7
dcdiaz avatar

dcdiaz

New Zenner

Join Date:
Jan 2010
Posts:
4
Plugin Contributions:
0

Re: Duplicate customer IDs in zen_address_book table

DrByte,

Ok, thanks for all your time and insight. We can consider this post closed.

dcdiaz