I would like to know this as well. My store sells many items that only 1 is available. It would really make a difference if the item was taken off the site when it sold.
However, there seems to be a problem with the simple product inventory not reducing when an order has been placed via a configurable product.
For some reason it seems to reduce the configurable product inventory even though the configurable product should not have any ‘inventory’.
I’ll test it out again.
ps. For some reason your post says that it was posted 11 months ago. Strange. *edit* post date back to normal now.
@medic - Please test on your end as I am not aware that we have issues in the latest Magento version. Please open a bug on our bug tracking system if you do feel there is a bug.
I have tested this with a fresh install and my modified version (1.1.2)
This is what I did:
Created a simple product with 2 units (I made this visible from the front end so I could test)
Created a configurable product and linked up the simple product.
If i place an order from the simple product page - the inventory reduces and the product does go ‘out of stock’.
If I place an order from the configurable product - the inventory of the simple product will remain the same.
The drop down menu on the configurable product page will still show the simple product.
I can only order the 2 units on the one order - but after the order has been placed I can go back and order another 2 units.
I have tried different combinations and tried using the quick simple product creator and nothing seems to work. I know someone else has had this same problem.
They replied to my other thread.
I have posted the bug, but have not had any answer. It has become a big problem because it is holding up our site launch.
Is it possible to have a script run via a cron job, which will “Disable” a product if the quantity is 0?
This would leave the functionality of in-stock/out-of-stock the way it is, but allow stores to make products go away when they are sold-out.
Well, not go away, but become unavailable.
I don’t know how functional the cron task-list is, or how easy something like this could be done.
Another option would be to setup the out-of-stock notification to a special address, which could then process the notification and fire a script, or a selected procedure to be performed. Then you just need a script or procedure to disable the product when the notification is received.
that sounds more like a workaround… working around the issue here.
I’m actually thinking of just locating that part of the code (probably the SQL WHERE query somewhere, in some shape or form) where I can just add the condition to query those items whose stock is not 0 to be displayed on the front end…
Adds a simple Check at the beginning of the “foreach” loop for list and grid (so do it twice). So it checks if product is in stock, if it is it will run through the rest of the loop. If it’s not in stock, it just ignores it and continues to the next product.
I moved where you added this code so it not only takes away the add to cart option but completely hides the entire product.
Unfortunately this method has some serious drawbacks, such as it breaks pagination.. If you have 3 out of 100 items in a category in stock, then you will have many empty pages! Same goes for searches.
Here is a solid solution that has the same effect without breaking the pagination, searches, etc.. It took much hair-pulling to figure this out so I posted it to my blog.
I moved where you added this code so it not only takes away the add to cart option but completely hides the entire product.
Unfortunately this method has some serious drawbacks, such as it breaks pagination.. If you have 3 out of 100 items in a category in stock, then you will have many empty pages! Same goes for searches.
Here is a solid solution that has the same effect without breaking the pagination, searches, etc.. It took much hair-pulling to figure this out so I posted it to my blog.