I have a product with 0 quantity and Out of Stock Product, and it is showing on front-end. Customer is able to do add that product to cart.

I run all commands like:

php bin/magento indexer:reindex
php bin/magento cache:flush
php bin/magento cache:clean

but issue not solved.

Please tell me the appropriate solution.

2 Answers 2


The command that you have used for reindex is wrong. Please use

php bin/magento indexer:reindex

Also check the value of

Stores->Configuration->Catalog->Inventory->Stock Options->"Display Out of Stock Products" is 'NO'

and the value of

Stores->Configuration->Catalog->Inventory->"Product Stock Options"->"Out-of-Stock Threshold" is zero

if you are using Magento 2.3

  • Please check my quesion again.
    – temper
    Commented Nov 21, 2019 at 7:13
  • and I wanted to display out of stock products, if I make it no or 0 it will not display out of stock product in frontend. My issue is add to cart button is showing. customer is able to add to cart out of stock item.
    – temper
    Commented Nov 21, 2019 at 7:15

After alot of research, I found the solution.

System configuration was wrong for Backorders.

enter image description here

Now I make it like this: enter image description here

and it makes my day :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.