Perspektive Web + Design

Feb04

Change attributes for configurable product in Magento

Author // Philipp Schöfer Categories // Tips and Tutorials

Change attributes for configurable product in Magento

Ever created a bunch of configurable products in Magento and later you figured you selected the wrong attributes when creating the product and would like to change them?

Here is a way to do this if you haven't assigned and sub-products to the configurable product yet. If you already assigned products to your configurable product you might have to change them all following the process below. But I didn't test that so proceed with care and always backup before you alter the database!

  1. Go to the back-end and notice the product id when editing the configurable product which attributes you would like to change. You can find it in the URL or, of course, in the table on the very left.
  2. Log into your phpMyAdmin and navigate to the "catalog_product_super_attribute" table. 
  3. Find the rows with the product id from step 1. These rows assign the product to specific super attributes. Which attribute is defined by the number of the "attribute_id" col. To know which attribute is represented by which number go to the back-end and access the attribute view. Hover over the attributes in the table and look at the link targets. The url contains the attribute_id.
  4. Now look at the table again. Alter the numbers by changing the attribute_id for the product id of the product you would like to change to the attribute ids that you want.
    Important: Remember which "super_attribute_ids" you are changing. Don't worry about which ones you deleted, the database automatically takes care that references in other tables will be deleted.
  5. Now navigate to the "catalog_product_super_attribute_label" table. Remember the "product_super_attribute_ids" and rename the labels for the appropriate ids. 
    For example: If in step 4 you changed the attribute_id for a product from 162 (Color) to 163 (Size) and the product_super_attribute_id of that row is 6. Find the row with the product_super_attribute_id 6 in the "catalog_product_super_attribute_label" table and change the column "value" from "Color" to "Size". If you already have subproducts for the configurable product you're changing, you also have to change the "catalog_product_super_attribute_pricing" table accordingly. However, there might be more steps associated to changing configurable products that already have products assigned to them. I didn't test that so be careful here.

About the Author

Philipp Schöfer

Philipp Schöfer

Philipp has been working in web development since more than 10 years and runs is own web development company. Feel free to get in touch with Phil if you want to hire him for your project or you want to chat about the latest.

Leave a comment

You are commenting as guest.