Closed (fixed)
Project:
e-Commerce
Version:
5.x-3.x-dev
Component:
cart
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
15 Feb 2007 at 02:17 UTC
Updated:
15 Mar 2008 at 04:40 UTC
Jump to comment: Most recent file
I created a shippable product with inventory management enabled and set to be only one item available.
If I add this item to the cart then I visit the cart and I update my cart asking for 2 products the system
does not warn me... and I have two products in my cart even if there is only one available in stock.
If I continue to checkout the system let me place the order of 2 products.
Hope this helps,
Fabio Varesano
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | ec-inventory-5.x.3.x-combined.patch | 2.71 KB | Thomas Sewell |
Comments
Comment #1
gordon commentedThis is a known bug, and to fix this is quite a bit of work, and changes to API's.
We are going to look at this in 3.1
Comment #2
fax8 commentedgordon,
I'm developing a Drupal 5 ecommerce website for a client. I need this bug to be solved then I can work on fixing this one.
So.. please.. if you can give me some ideas on what I need to change and fix for this it would be really useful.
I'm still new in ecommerce module development then some hints are needed.
Thanks,
Fabio
Comment #3
fax8 commentedSeems that also 4.7 version of the module has this problem.
Comment #4
gordon commentedThis is a much bigger problem than you realize.
Besides the change in the productapi() to pass the qty that is being added to the cart, the system doesn't deduct the quantity until the payment has been made. So during that time more than the available amount can be added the the cart, and then purchased.
To fix this issue is actually quite a large job, because we need to do temporary allocation of stock, and then remove the temporary allocation once it has been purchased, or the temporary allocation expires.
Then also it has to deal with orders that have been created and not paid for, as they will not have an allocated bit of stock to them, and they may not have the stock available when the purchase is made later.
This is not a small task, and needs to be well thought out before it can be done.
Comment #5
fax8 commentedYes, I can understand... Maybe it's better to wait you to implement this one.
I will however follow the progress of this one.
Meanwhile I'm going to create a module which disable the update cart feature
by hiding the button. This is just an ugly workaround however it's the only solution.
(In the website I'm developing products are unique, only one, then this is ok).
Fabio
Comment #6
jochen wendebaum commentedI had the same problem and modified cart.module in the following way:
here I inserted:
The result is, that I cannot add more than the number available currently in the stock.
I use this for tangible products with low amounts, no shipping (boe) and anonymous access.
There is of course no warranty that this resolves the problem for your case and this hack should not be committed into the official software as it does not check for any dependencies or anything.
Kind regards,
Jochen Wendebaum
Comment #7
gordon commentedThis will not work as it will remove stock that has not been sold.
I have a couple of ideas to help fix this problem and I will fix this in v4
Comment #8
brmassa commentedGuys,
fixed on eC4.
regards,
massa
Comment #9
(not verified) commentedComment #10
Thomas Sewell commentedHere's a combined patch for the 5.x-3.x version of the cart to deal with stock-out inventory issues in all three places (add to cart, subproducts, cart view). See also http://drupal.org/node/141237 and http://drupal.org/node/130980.
It also adds to the above version by including a message to the user and dealing with an inventory of 0 by removing the product from their cart, which is why I'm placing the patch here. Presumably this patch will only be useful until EC4 is stable.
Comment #11
djflux commentedFYI, as far as I know this problem still exists in ec 3.x.
Massa, I'd like to talk with you and Gordon about how real problems in the 3.x branch should be resolved. Until the 4.x branch becomes stable and production-ready, I don't believe issues such as this one should be changed to the "fixed" status. If you'd like to take this discussion offline, I'd be happy to discuss it further via IRC or email, or perhaps discuss it in a forum setting where other Drupal eCommerce users can provide their feedback and possibly donate some time to fixing, patching, and testing.
Comment #12
gordon commentedThere are a lot of issues with the e-Commerce and the way that it was built. some of things where not built right and just make it not possible to fix these problems very well.
This has been fixed in v4 and we are concentrating on v4. Some people have come back and said that v4 is much more stable than v3