Zen Cart Logo
Forums / General Questions / Duplicates: is already in the database

Duplicates: is already in the database

Views: 1,265

Results 1 to 11 of 11
24 Sep 2012, 10:59 PM
#1
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Location:
Amarillo, Tx
Posts:
1,683
Plugin Contributions:
0

Duplicates: is already in the database

I am not sure if anyone could help me in this area. How to do I keep having double entries in my store? Like for an example:

my item number #15062

Item name: Domain Name that is already in the database.

Then in a later date or time if I try to enter this again into the Database and it will say "This item is already in the Database."

Is there a mod for this?

25 Sep 2012, 1:56 AM
#2
drbyte avatar

drbyte

Sensei

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

Re: Duplicates: is already in the database

I can't figure out what on earth you're talking about.

a) If I install a fresh new copy of v1.5.0 (since you said you're using v1.5.0), what exactly do I need to do to my store so that I can exactly recreate the problems you're encountering?
b) And then what exact steps must I take to see what you're seeing?

Also, please click Reply below and answer all the questions in the Posting Tips section, especially the part about your site history, upgrades, plugins, etc.

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

25 Sep 2012, 2:37 AM
#3
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Location:
Amarillo, Tx
Posts:
1,683
Plugin Contributions:
0

Re: Duplicates: is already in the database

No, No, No, what I am talking about is duplicate Items I am not talking about the a fresh new store or database.

25 Sep 2012, 2:41 AM
#4
drbyte avatar

drbyte

Sensei

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

Re: Duplicates: is already in the database

duplicate "item"?

I must be aging faster than I thought. While you're using english words I don't have a clue what you're referring to.

Can you try and help me understand the much broader context here?
When you sat down at your computer, after turning on the light in a room, and turned on the computer, what did you have to do to arrive at some place where you were seeing "duplicate item" messages in relation to your Zen Cart store? Pretend I'm totally dumb. (might not be so hard to pretend! haha!)

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

25 Sep 2012, 2:47 AM
#5
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Location:
Amarillo, Tx
Posts:
1,683
Plugin Contributions:
0

Re: Duplicates: is already in the database

DrByte,

Your not dumb,,, I will try and make this more clearer.

Ok, after I enter an item/product into the database.

then later time or date I enter the same item/product sometimes I forget what I enter the database. My question is,,,, is there way when I enter the same item/product then it tells me this "item/product is already in the database" so I won't have enter it so many times by accident?

25 Sep 2012, 2:55 AM
#6
drbyte avatar

drbyte

Sensei

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

Re: Duplicates: is already in the database

Oh.
Thanks for explaining in more detail. It's always helpful to step way back and explain the business problem behind the question. I think I know better now what problem you're wanting to solve...

You're asking to have the store read everything you've entered, compare it against everything already in the database, and intelligently know whether any of that information is already there.

What "rule" would it be able to use to know whether it's a duplicate? It's very difficult to consistently detect duplicates without having a common unique "key".
There are a thousand ways to misspell a product name or to add spaces between words or name a product differently ("Pictures of our Wedding" vs "Wedding Pictures" vs "Wedding Photos", for example), so using the product name would be a bad idea.
Most often stores will use the "product model number" as a unique key. If there was a plugin that would do the checking, would it be safe to tell it to only compare whether the MODEL NUMBER you entered is already in the database? If not, what else is your magical unique key in your business?

Oh, another important question: WHY do you find yourself entering duplicates anyway? What's the business process that makes you enter something that's already in there? Who's telling you to add it, without knowing it's already there?

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

25 Sep 2012, 2:58 AM
#7
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Location:
Amarillo, Tx
Posts:
1,683
Plugin Contributions:
0

Re: Duplicates: is already in the database

Well thank you anyways. I just thought I ask.

25 Sep 2012, 3:06 AM
#8
drbyte avatar

drbyte

Sensei

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

Re: Duplicates: is already in the database

Uh oh.

Judging from your reply I'm guessing I sounded rude? I certainly didn't mean to. I was trying to ask you enough questions to understand your business process in order to see if there was a way to come up with a plugin that would do as you were asking.

I meant them as exploratory questions, not as a statement that it can't be done. :(

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

25 Sep 2012, 3:08 AM
#9
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Location:
Amarillo, Tx
Posts:
1,683
Plugin Contributions:
0

Re: Duplicates: is already in the database

Yes, I was hoping there was a plugin for something like this.

25 Sep 2012, 3:13 AM
#10
drbyte avatar

drbyte

Sensei

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

Re: Duplicates: is already in the database

I don't know of one presently, but if I knew the rules that it would need to follow in order to "know" what constitutes a "duplicate" as far as your store's products go, it might be possible to write one. That's why I was asking all those questions, because the answers are necessary in order for such a plugin to be possible.

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

25 Sep 2012, 8:32 AM
#11
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,875
Plugin Contributions:
7

Re: Duplicates: is already in the database

You could (..should) use unique model numbers: the various (non core Zen Cart) programs that can export product information and import new products use that as a reference.
If you try to import a duplicate "new" product using a model number that already exists in the database it will show you an error/tell you that.
I use Apsona, but Easypopulate does the same (questions about these products should be made in the relevant support thread).

Otherwise you'll need some code in the product data entry page to check the model number against the database.

Ideally this would happen as you enter the model number: you could adapt the Instant Search
http://www.zen-cart.com/downloads.php?do=file&id=1336
for this field to show the existing model numbers as you type the new number in, to show you any duplicate.

Hours of fun for all the family!

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...