Display Out of Stock product and disable Add to Cart button
-
12-12-2019 - |
Question
I have a store where product quantity are set to 0. I have enabled back orders if qty is 0 for a product, however I would like to disable Add to cart in case product is out of stock. This means Add to cart is only available if qty is 0 and In stock is selected in Product Inventory tab. I tried to change couple of settings in System -> Configuration -> Catalog-> Inventory but unable to enable such rule.
Any one who could help?
Thank you
Solution
By default in Magento, if you go to System -> Configuration -> Catalog -> Inventory and set Backorders to "Allow Qty Below 0", and on the product page in the inventory tab you have the following settings:
then, the product should show as "In stock" on frontend and the customer should be able to add it to cart:
By changing the Stock Availability of the product to "Out of stock" you should be able to get it to show as "Out of stock" on the frontend:
Are you trying this with the default Magento theme? If you are using a custom theme and this is not happening for you with these setting there might be a problem in the theme you are using.