Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- INSERT INTO catalog_product_index_price (entity_type_id,attribute_id,store_id,entity_id,value) VALUES (
- SELECT entity_type_id,attribute_id,store_id,entity_id,value FROM (
- SELECT 4 as entity_type_id, 456 as attribute_id, 0 as store_id, catalog_product_link.product_id as entity_id, catalog_product_index_price.min_price as value
- FROM catalog_product_index_price
- JOIN catalog_product_link ON catalog_product_link.linked_product_id = catalog_product_index_price.entity_id
- WHERE catalog_product_link.link_type_id IN (
- SELECT link_type_id
- FROM catalog_product_link_type
- WHERE code LIKE 'custom_%'
- )
- GROUP BY catalog_product_link.product_id
- ORDER BY catalog_product_index_price.min_price
- ) as from_price_table);
Add Comment
Please, Sign In to add comment