veilig
veilig

Reputation: 5135

In Magento, is there a way to remove attribute from configurable product after already created?

In Magento, I have have a bunch of configurable products already created and now have a client that has changed their mind and wants to remove one of the attributes. I'm having a hard time figuring out how to do this b/c I keep getting an error message saying:

This attribute is used in configurable products. You cannot remove it from the attribute set.

I have tried going into the attribute and changing Use to Create Configurable Product from "yes" to "no", but that didn't seem to do anything when trying to remove attribute from existing products

Upvotes: 14

Views: 19730

Answers (6)

Jonathan
Jonathan

Reputation: 11494

Building on Christian Davén's answer, you could use the following to delete based on the attribute_code name instead of the attribute_id itself, just to be sure that you are referencing the right ID:

DELETE FROM `catalog_product_super_attribute`
WHERE `attribute_id` IN (
    SELECT `attribute_id` FROM `eav_attribute`
    WHERE `attribute_code` = "attribute"
)

Upvotes: 1

Chin
Chin

Reputation: 11

Simply use phpmyadmin and connect to your database. Look for the eav_attribute table. Delete the attribute you want.

Upvotes: 1

Stephan ten Kate
Stephan ten Kate

Reputation: 91

Unfortunately, this is not possible from the standard Magento backend. As such, you have to look at SQL solutions (I'm not familair with these).

Upvotes: 0

Christian Davén
Christian Davén

Reputation: 18187

To remove one super product attribute (as they are called) from all configurable products, you could execute this SQL query in the database:

DELETE FROM catalog_product_super_attribute
WHERE attribute_id = <id>

The table catalog_product_super_attribute links products to super product attributes. You can add and remove attributes to created configurable products there.

Upvotes: 17

Prashant
Prashant

Reputation: 5461

may be this could help: http://www.magentocommerce.com/boards/viewthread/6059/#t327478

Upvotes: 0

Jonathan Day
Jonathan Day

Reputation: 18702

It seems like you're trying to remove the attribute from the attribute set first, but you need to remove it from the configurable products, then the attribute set. Open each configurable product, go to the Associated Products tab and remove the attribute (and linked products) that is not required. Save each product and then try removing the attribute from the set.

Upvotes: 3

Related Questions