Skip to content

Instantly share code, notes, and snippets.

@peterjaap
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peterjaap/9346846 to your computer and use it in GitHub Desktop.
Save peterjaap/9346846 to your computer and use it in GitHub Desktop.
Place products in a specified category based on attribute set
SELECT @cat_id := entity_id FROM catalog_category_flat_store_1 WHERE url_path = 'merken/makita';
SELECT @attr_set_id := attribute_set_id FROM eav_attribute_set WHERE attribute_set_name = 'Makita';
INSERT IGNORE catalog_category_product (category_id,product_id) SELECT @cat_id, entity_id FROM catalog_product_entity WHERE attribute_set_id = @attr_set_id;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment