Forums / Bug Reports / [Done v1.3.9e] Clearing quantity field on shopping cart should be the same as "0"

[Done v1.3.9e] Clearing quantity field on shopping cart should be the same as "0"

Locked

Started by swguy on 12 Jul 2010, 10:55 PM · Views: 910

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
12 Jul 2010, 10:55 PM
#1
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,751
Plugin Contributions:
56

[Done v1.3.9e] Clearing quantity field on shopping cart should be the same as "0"

This is behavior that used to work in 1.3.8 and has been broken in 1.3.9. The fix is simple; in includes/classes/shopping_cart.php, above line 1535, add

  if ($_POST['cart_quantity'][$i] == '')  {
     $_POST['cart_quantity'][$i] = 0; 
  }

Scott

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.

13 Jul 2010, 12:54 AM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: [Done v1.3.9e] Clearing quantity field on shopping cart should be the same as "0"

If I enter 12 for a product and add to cart .. I see 12 ...

If I then, on the shopping_cart page, change the value to 0 it gets removed from the cart ...

Now if I change it to "nothing" as in blank, it goes back to 12 ...

Is this what you are meaning on this one?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

13 Jul 2010, 12:58 AM
#3
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,751
Plugin Contributions:
56

Re: [Done v1.3.9e] Clearing quantity field on shopping cart should be the same as "0"

Yes, exactly. I believe that clearing the field to nothing or blank should be the same as entering 0. This was the behavior in 1.3.8, and I believe it is the most intuitive response to this action. My small code fragment makes it work this way.

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.