cancel
Showing results for 
Search instead for 
Did you mean: 

Products marked 'Out of Stock' changing to 'In Stock'

Products marked 'Out of Stock' changing to 'In Stock'

In Magento 2.3.4 I have changed the 'Stock Status' to Out of Stock for a product. I've left the quantity at 100 and the Salable quantity remains at 100. Is there a Cron event that changes the item to be 'In Stock' based on quantity? I have items that appear back 'In Stock' after I have clearly changed them to Out of Stock.

2 REPLIES 2

Re: Products marked 'Out of Stock' changing to 'In Stock'

Hello @mraccine ,

 

I think the cron event is not changing the status of the quantity. But try this way.

  1. Set System->Configuration->Catalog->Inventory->Backorders=Allow Qty Below 0.
  2. Set System->Configuration->Catalog->Inventory->Stock Options->Display Out of Stock Products=Yes
  3. Run the following SQL statement from your PHPMyAdmin because Magento will not allow changing the Qty for Item's Status to Become Out of Stock option to put negative value like -1.
    UPDATE core_config_data SET value = '-1' WHERE path = 'cataloginventory/item_options/min_qty';
  4. Check the settings - System->Configuration->Catalog->Inventory and check that Qty for Item's Status to Become Out of Stock is now -1.
  5. Set all store products to In stock: Catalog->Manage Products, Select all products -> Select "Actions"->Update Attributes -> Submit, Select Inventory -> Stock Availability = In Stock -> SAVE

  6. Re-index all indexes.

  7. Once you have done, all products are In Stock and you will only set the products Out of stock when the value goes below zero (our setting is -1). 

  8. Now modify the theme. 

Now apply the IF condition that if the product is "In Stock" then display the Add to cartthis needs to be removed now and the site has been modified in order to display for all products.

 

Hope this will help you!

 

Click kudos and accept it as an answer.

 

Thank you...!!

Re: Products marked 'Out of Stock' changing to 'In Stock'

did you find the answer for this? this is happening to me as well. I dont know why yet.