Created
May 27, 2013 09:54
-
-
Save jkaflik/5656224 to your computer and use it in GitHub Desktop.
Fix for "Stock item for Product is not valid" error in Magento 1.x. It reproduces cataloginventory_stock_item using product entities.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT INTO `cataloginventory_stock_item` ( | |
`item_id` , | |
`product_id` , | |
`stock_id` , | |
`qty` , | |
`min_qty` , | |
`use_config_min_qty` , | |
`is_qty_decimal` , | |
`backorders` , | |
`use_config_backorders` , | |
`min_sale_qty` , | |
`use_config_min_sale_qty` , | |
`max_sale_qty` , | |
`use_config_max_sale_qty` , | |
`is_in_stock` , | |
`low_stock_date` , | |
`notify_stock_qty` , | |
`use_config_notify_stock_qty` , | |
`manage_stock` , | |
`use_config_manage_stock` , | |
`stock_status_changed_auto` , | |
`use_config_qty_increments` , | |
`qty_increments` , | |
`use_config_enable_qty_inc` , | |
`enable_qty_increments` , | |
`is_decimal_divided` | |
) | |
SELECT NULL , entity_id, '1', '1', '0.0000', '1', '0', '0', '1', '1.0000', '1', '0.0000', '1', '1', NOW( ) , NULL , '1', '1', '1', '0', '1', '0.0000', '1', '0', '0' FROM `catalog_product_entity`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for this! I needed to use "INSERT IGNORE INTO" because not all my products were messed up.