Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Change Status to Disabled when Product qty =0 (Out Of Stock)
 
RedskinsOne
Jr. Member
 
Total Posts:  22
Joined:  2012-02-20
 

I’m hoping someone can help me here.  I’m looking for a way to change the Status from ‘Enabled’ to ‘Disabled’ when a product is sold ouit (qty=0).  I know Magento changes the Stock Availability to “Out of Stock” but it still leaves the Status as ‘Enabled’..  Is there an easy way to change the code to say when qty =’0’ or out of stock to change status to ‘Disabled’

Any help would be appreciated!!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
sumantechno
Guru
 
Avatar
Total Posts:  478
Joined:  2010-03-09
Bangalore
 

You can configure Magento so that “out of stock” products will not be displayed in the fontend.
Check the screen short.

Image Attachments
Configuration - System - Magento Admin 2012-05-02 14-21-57.png
 
Magento Community Magento Community
Magento Community
Magento Community
 
RedskinsOne
Jr. Member
 
Total Posts:  22
Joined:  2012-02-20
 
magento4U - 01 May 2012 11:56 PM

You can configure Magento so that “out of stock” products will not be displayed in the fontend.
Check the screen short.

Yes I saw this option.  The problem is that if someone else had this product in their shopping cart before it was sold out, it does not remove the product from the shopping cart.  The customer can’t purchase the product, but the item remains there unless they manually remove it.

For my store setup, if the product is sold out (out of stock), I need Magento to remove this product from shopping carts of other customers.

 
Magento Community Magento Community
Magento Community
Magento Community
 
sumantechno
Guru
 
Avatar
Total Posts:  478
Joined:  2010-03-09
Bangalore
 

The customer can’t purchase the product, but the item remains there unless they manually remove it.

At that time if you refresh the cart ,the product will be removed.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top