Magento Forum

   
Product ID vs Entity ID
 
roco
Sr. Member
 
Total Posts:  191
Joined:  2008-03-18
 

After struggling to update a 30k part inventory through the dataflow modules(soo slooooooow), I am trying to work with the “cataloginventory_stock_item” table and relate it to a product sku.  Is the “product_id” field the same as “entity_id” in the “catalog_product_entity” table?

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
LindyKyaw
Sr. Member
 
Avatar
Total Posts:  138
Joined:  2008-01-02
Los Angeles
 

Yes, product_id from cataloginventory_stock_item and entity_id from catalog_product_entity are the same.

 
Magento Community Magento Community
Magento Community
Magento Community
 
roco
Sr. Member
 
Total Posts:  191
Joined:  2008-03-18
 

Thanks LindyKyaw!

So can I edit this “cataloginventory_stock_item” table directly without impact to other tables, in order to update inventory?

 
Magento Community Magento Community
Magento Community
Magento Community
 
jeff.meyer
Member
 
Total Posts:  51
Joined:  2008-11-24
 

roco: Curious to know if you’ve found any problems as a result of this direct update.  I’m in the same boat - 30k products whose inventories change on an hourly basis due to outside mage sales.  I’ll be making this edit directly and can’t imagine any issue… but figured it’s worth asking wink

 
Magento Community Magento Community
Magento Community
Magento Community
 
roco
Sr. Member
 
Total Posts:  191
Joined:  2008-03-18
 

No Problems yet.......  V 1.1.6

 
Magento Community Magento Community
Magento Community
Magento Community
 
jeff.meyer
Member
 
Total Posts:  51
Joined:  2008-11-24
 

Thanks Roco.  I actually found one for 1.2.1…

If an inventory falls below 1, the “stock status” needs to change on the item:

In ‘cataloginventory_stock_item’ is_in_stock needs to be set to ‘0’
In ‘cataloginventory_stock_status’ stock_status needs to be set to ‘0’

And, of course, once that item comes back in stock, those need to be set back to ‘1’

Hope that helps when you upgrade smile

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top