Hello Folks:
I am migrating to Zencart+beanstream from eSellerate. I've purchased the manual (and read it), and used this forum to solve many challenges so far... thank you to all for the excellent help!
But... I've run into an odd problem, to which I've not found the answer yet:
- I have a product for which I want the maximum # of items in the cart to be 1 (in this case, a downloadable product, implemented as recommended as an attribute)
- I've set the Product Qty min/max/unit to 1.
- I've set Products Quantity Box Shows to no.
- Product is not virtual.
- Using latest Zencart: 1.3.9h
The problem is that when you add the product to the cart, then continue shopping and return to the product page, then add it again to the cart, I do not get the "The quantity added to your cart has been adjusted..." message for the cart, and the quantity is increased by one. One can keep doing this and the quantity keeps going up.
I debugged shopping_cart.php, around line 1611, and found that $cart_qty is 0! $new_qty is 1, and $add_max is 1, as expected. The product id is correct too (I echoed them from line 1611 as a test to make sure.) As $cart_qty is coming back as 0 ($this->in_cart_mixed($_POST['products_id']), indeed the code below line 1611 will not trigger and will not restrict the addition as expected.
I'm not familiar with the code enough to understand why this would be the case, but I have seen this work properly in other Zencart implementations, including the actual Zencart e-book store:
http://www.cucumbermedia.com/store
My store, that demonstrates this is:
http://deepnettech.com/estore
Although I'm actively developing it, so it could change.
I thought at some point early on that I had this working, but maybe I am mistaken. I've made NO code changes at all to the project (other than to debug this case.)
I'm hoping some other setting change I've made related to this may be causing this problem. I've also tested it in a new browser session, even a different browser... no luck.
Any guidance would be appreciated!
Thanks,
Dan Pronovost
Bookmarks