Posted almost 6 years ago. Visible to the public.

Removing Custom Attributes Across Multiple Products

If you have custom attributes named the same across multiple products, you
wish to remove said attributes, this might come in useful. The SQL below restricts
the removal of the attributes to a certain attribute set name, but you can remove
this is you want to remove custom options from all attribute sets:

DELETE o FROM catalog_product_option o INNER JOIN catalog_product_option_title t ON o.option_id = t.option_id INNER JOIN catalog_product_entity p ON o.product_id = p.entity_id INNER JOIN eav_attribute_set a ON p.attribute_set_id = a.attribute_set_id WHERE t.title IN ( 'Option 1', 'Option 2', 'Option 3', 'Option 4', ) AND a.attribute_set_name = 'Attribute set name';

Owner of this card:

Mike Whitby
Last edit:
almost 6 years ago
Posted by Mike Whitby to Magento
This website uses cookies to improve usability and analyze traffic.
Accept or learn more