Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #select to view all products without weight in database:
- #TAKE CARE that weight attribute id is the right value
- SELECT p.sku, w.value FROM catalog_product_entity as p
- LEFT JOIN catalog_product_entity_decimal as w ON (p.entity_id = w.entity_id AND w.attribute_id = 101)
- WHERE w.value IS NOT NULL;
- #insert weight in catalog_product_entity_decimal for all products without value in that table:
- #TAKE CARE to use the right entity_ids (depending on magento version)
- INSERT INTO catalog_product_entity_decimal (entity_type_id, attribute_id, store_id, entity_id, value)
- SELECT 10, 101, 0, p.entity_id, 1.000 FROM catalog_product_entity as p
- LEFT JOIN catalog_product_entity_decimal as w ON (p.entity_id = w.entity_id AND w.attribute_id = 101)
- WHERE w.value IS NULL;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement