How to Delete Configurable Product Attributes

attributesconfigurable-productproduct

Trying to delete a configurable product attribute and it comes up with a
"This attribute is used in configurable products." Error.

The product associated with this attribute is now disabled but we don't really want to delete it if we can help it (we want to keep a record of this for customers). We need to delete these as we have almost 200 configurable attributes like this. This becomes really slow with 2 stores and 300+ attributes when loading a product (Mage::getModel('catalog/product')->load($id) // all attributes loaded).

I was wondering if there is there away to either stop Magento from loading all configurable product attributes not associated with the product when load() is called or reduce the number of configurable attributes we have without deleting the products. (Perhaps we could create a single dummy attribute to replace all the configurable product attribute that we don't use) ?

Any ideas?

Thanks in Advance,

Best Answer

When you have some configurable products created on the basis of that attribute you can't delete the attribute. But if you want to really delete that attribute, you have to delete the products first.
You will not find any hacky method for it. These attributes are saved in eav attribute table and products just get its id (attribute_id) to relate. so if you delete the attribute, you will face errors like "something is being load non-object..." etc, and you may even not be able to edit that product at backend nor it will load at frontend. so be cautious before committing such things on live.

Related Topic