Forums / General Questions / Avoid duplicate product name in Cart

Avoid duplicate product name in Cart

Locked

Views: 1,333

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
30 Nov 2010, 6:21 PM
#1
fawad123 avatar

fawad123

New Zenner

Join Date:
Oct 2009
Posts:
93
Plugin Contributions:
0

Avoid duplicate product name in Cart

I'm selling downloadable products on my website. Sometimes, by mistake a customer adds the same product twice and pays for it. As a result of this mistake each time i need to refund the payment to customer for duplicate product.

Is there any way i can put a check on shopping cart to allow unique products only. The client must not be able to add same product twice.

Please tell me how can i do that?

30 Nov 2010, 7:15 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Avoid duplicate product name in Cart

Admin > Catalog > Categories/Products > edit your product > Product Qty Maximum: [] 0 = Unlimited, 1 = No Qty Boxes
Set to 1.

30 Nov 2010, 9:57 PM
#5
drbyte avatar

drbyte

Sensei

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

Re: Avoid duplicate product name in Cart

Glenn, your answer should be sufficient.

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

2 Dec 2010, 1:55 AM
#6
fawad123 avatar

fawad123

New Zenner

Join Date:
Oct 2009
Posts:
93
Plugin Contributions:
0

Re: Avoid duplicate product name in Cart

I have tried it:

Admin > Catalog > Categories/Products > edit your product > Product Qty Maximum: [] 0 = Unlimited, 1 = No Qty Boxes
Set to 1.

But the problem is still there i can add same product twice in the shopping cart. Is there any other solution?

2 Dec 2010, 1:59 AM
#7
drbyte avatar

drbyte

Sensei

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

Re: Avoid duplicate product name in Cart

I'm having trouble duplicating that on a clean fresh uncustomized install of v1.3.9h. Setting "Product Qty Maximum" to 1 prevents me adding the item to the cart multiple times. I get an error message instead.

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

2 Dec 2010, 2:10 AM
#8
fawad123 avatar

fawad123

New Zenner

Join Date:
Oct 2009
Posts:
93
Plugin Contributions:
0

Re: Avoid duplicate product name in Cart

You may be right because i have customized the "product info page" and i might have removed the quantity check code from the "tpl_document_product_info_display.php" file. I think i'll have to look for the original file and add the code for "quantity check" again. Is that right?

But you know the "Product Qty Maximum" was set to 0 previously and now setting back it to 1 does not work for me.

What do you say?

2 Dec 2010, 6:10 AM
#10
drbyte avatar

drbyte

Sensei

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

Re: Avoid duplicate product name in Cart

fawad123:

But you know the "Product Qty Maximum" was set to 0 previously and now setting back it to 1 does not work for me.

What do you say?
I say the problem is on your end, since the test I did started with it set to 0, and when I changed it to 1 it prevented me from adding more than 1 of that item to my cart, exactly as intended.

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

2 Dec 2010, 12:10 PM
#11
fawad123 avatar

fawad123

New Zenner

Join Date:
Oct 2009
Posts:
93
Plugin Contributions:
0

Re: Avoid duplicate product name in Cart

Thanks for taking me to the right direction. I"ll update the code in the doucment product info page.