I am updating is_in_stock field in cataloginventory_stock_item as follows:

UPDATE cataloginventory_stock_item ci SET ci.is_in_stock = CASE WHEN ci.qty = 0 THEN 0 WHEN ci.qty > 0 THEN 1 END WHERE product_id in (1968,1969);

I then Reindex All & Flush Cache: Changes have been applied to cataloginventory_stock_item & cataloginventory_stock_status But Products are still showing Out of Stock on website

Note: If I go to Magento Dashboard -> Catalog -> Products and mark the product Out of Stock and then back to In Stock it works. (But I don't want to do this for 2,000 products)

Any ideas? Thanks in Advance!

  • which magento version are you using? Mar 8 '21 at 16:36
  • Magento version 2.3
    – Skater
    Mar 8 '21 at 16:40

I resolved this myself:

status field in table: cataloginventory_stock_item needed to be updated to 1

FYI found the tables that were being updated by using:

select table_schema as database_name, table_name, update_time from information_schema.tables tab where update_time > (current_timestamp() - interval 30 day) and table_type = 'BASE TABLE' and table_schema not in ('information_schema', 'sys', 'performance_schema','mysql') -- and table_schema = 'your database name' order by update_time desc;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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