Home » Magento Themes » How to update all products inventory to use config settings

How to update all products inventory to use config settings

Magento Tutorial now will show you a solution for a Magento problem. When you imported products for your Magento site. Somehow, all products do not use default settings for inventory anymore. Each product has its own configuration for inventory, like below picture:
 photo inventory-config_zps7027dc33.png
In this case, it causes some problems for his site when creating orders in back-end. It will displays this error message: “The stock item for Product is not valid.”

It is easy to solve the problem. We just need to update these products to “use configure settings”. But how long will it take if you have to update each product when you have some thousands. Luckily, we can use database to update all products.

Go to your phpmyadmin, look at table ‘cataloginventory_stock_item’. You will need to set manage_stock = 0, and use_config_manage_stock = 1 for these items. The simple sql command for this is:

  1. UPDATE cataloginventory_stock_item SET manage_stock=0, use_config_manage_stock=1 WHERE
As you want to update for many products at one time, you should try to find out your own condition which goes after WHERE. You might use a list of product ids or join with catalog_product_entity.

About Gareth

Gareth is an editor at Tutorial Magento. His special hobby is to share magento knowledge and experience with everyone.

One comment

  1. avatar

    Thanks for this basic information provided. Better to understand with the screenshot. Expecting these kinds of articles.

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

Scroll To Top