I would like to update all my simple products in database by direct sql to set "manage stock" to 1 but don't know how to start.
Magento SQL – Set Manage Stock 1 for All Simple Products
MySQLstock
MySQLstock
I would like to update all my simple products in database by direct sql to set "manage stock" to 1 but don't know how to start.
Best Answer
Magento basically
mapped products and its inventory
tocataloginventory_stock_item
.As you want to update and then you need update the columns at
manage_stock
, `use_config_manage_stock,is_in_stock.You can get simple product list from catalog_product_entity
SELECT entity_id FROM catalog_product_entity where type_id='simple'
.Now You can fill your requirement by