Magento - How to clean up attributes not in attribute set
I am taking over a website from another developer, and have found the
setup of attributes to be a bit of a mess.
Specifically, products have attributes that aren't associated with the
relevant attribute sets.
If you take wine with an attribute set "Wines", one of whose attributes is
"Grape Variety".
But I also have "Beers" with a completely different attribute set, but
somehow one of my beers has a Grape Variety.
It's not assigned to the Beers attribute set, it doesn't show up in the
back end for this product, (so I can't edit it) but if I look in the
database it's there (in catalog_product_entity_* and
catalog_product_index_eav), furthermore when I do an export it's there
too, and if someone searches for "Merlot", they are coming up with this
beer. There are hundreds of products like this.
What is the best way of removing all attributes from products that are not
within their assigned attribute sets?
I could figure it out in SQL I'm sure, but that's not the best way of
doing things as I'd be afraid of missing something and screwing up the
products altogether.
No comments:
Post a Comment