I have a client who has set the inventory of all products in 9999 pieces. Now he wants to use the warehouse management. It should all products are reset to 1. Is it possible to automatically make?

Maybe with a SQL-Query? Or an extension? We use Magento

Thank you ever


If you're not deep into MySQL queries or if you don't have a direct access to database, you can do the same in the Magento back-office.

Go to Catalog -> Manage product, in the product table header on the left click on "select all" and then in the same bar at right "updated attribute" and "submit". You can do that operation filtering only the product you need, by using the bar filters before clicking "select all".

It will open a new cumulative form, navigate to tab "inventory" and modify the value.

  • 1
    Nice alternative for those not comfortable editing directly. – Moose Jan 23 '15 at 9:26
  • thanks a lot! I did not know that it's so easy. – htausw Jan 23 '15 at 10:01

The inventory is kept in the table cataloginventory_stock_item. The column you are looking for is qty.

Run this query:

UPDATE `cataloginventory_stock_item` SET `qty` = 1;

But make sure you backup first and rebuild the indexes when you are done.

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.