Forums / General Questions / Add to cart w/ quantity=0 is allowed?

Add to cart w/ quantity=0 is allowed?

Locked

Views: 1,147

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
6 Oct 2009, 11:30 AM
#1
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,116
Plugin Contributions:
56

Add to cart w/ quantity=0 is allowed?

Running (off-line) using 1.38a + security mods + FEC:

I've got my store setup to use a quantity box along with the add-to-cart button. When I set the quantity to 0 and press add-to-cart, a message appears ("Successfully added Product to Cart") but, of course, the cart is still empty.

What module need I modify to catch this entry error?

6 Oct 2009, 3:20 PM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Add to cart w/ quantity=0 is allowed?

In my stock Zencart test site, it doesn't do that. Maybe the FEC mod?

7 Oct 2009, 11:31 AM
#3
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,116
Plugin Contributions:
56

Re: Add to cart w/ quantity=0 is allowed?

Thanks for the response, I'll check it out.

8 Oct 2009, 4:45 AM
#4
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,116
Plugin Contributions:
56

Re: Add to cart w/ quantity=0 is allowed?

Well, I rolled back to my initial install to see what's up ... and the behavior is still there. I don't know if it matters, but my products have attributes.

Here are the cart/quantity-related settings I've got in admin:

My Store:

  • Display cart after adding product: false

Product Listing:

  • Display Product Add to Cart Button: **2 **(on w/ Qty Box per product)
  • Display Multiple Products Qty Box Status and Set Button Location: **0 **(off)

Product Info:

  • Product Quantity Box Status - Adding new Products: **1 **(show Qty Box and default Add to Cart to 1)

When you get the error after an attempt to add 0-quantity to the cart, is it a javascript message or a php-related message that you receive?