Magento News

 

Magento: Bulk change product store id

I’ve just imported ~800 products into Magento before realising I had store_id set to 0 when it should have been 1.

Does anyone know an easy way to update this? I’ve tried changing the store_id to 1 in the spreadsheet and importing it again to update them but it hasn’t worked.

I found this SQL at http://www.magentocommerce.com/boards/viewthread/1798/ but I’m getting syntax errors and unknown column errors so I’ve not gone any further with it.

REPLACE INTO catalog_product_store (store_id, product_id) SELECT 1,entity_id from catalog_product_entity
update catalog_category_entity set store_id = 1 where store_id = 0;
update catalog_product_entity set store_id = 1 where store_id = 0;
update catalog_product_entity_datetime set store_id = 1 where store_id = 0;
update catalog_product_entity_decimal set store_id = 1 where store_id = 0;
update catalog_product_entity_gallery set store_id = 1 where store_id = 0;
update catalog_product_entity_int set store_id = 1 where store_id = 0;
update catalog_product_entity_text set store_id = 1 where store_id = 0;
update catalog_product_entity_tier_price set store_id = 1 where store_id = 0;
update catalog_product_entity_varchar set store_id = 1 where store_id = 0;

Magento: Bulk change product store id

Possibly Related Posts:


 

Leave a Reply