Skip to content

Adding a Configurable Attribute to an Existing Configurable product

In Magento, you might make a mistake, and create a configurable product without the attribute that you need. Or your products might change over time-your shirts might come in different colors now, when before they only came in different sizes. You can’t add a new configurable attribute to an existing product through the CMS; Here is how to do it; I don’t think that this is documented anywhere:

1) Access your Magento database using your preferred method. I usually use phpMyAdmin when I am inserting something into the database-the web form is an additional failsafe against making a SQL mistake.
2) Look at the catalog_product_super_attribute table. You’ll need to add an entry to this table in order to add a new configurable attribute for your product. This table has four columns:
-product_super_attribute_id (the primary key for this table)
-product_id (the id of the configurable product)
-attribute_id (the id of the attribute to add)
-position (attributes will be ordered by default from lowest position to highest position, in the CMS and on the front end)
3) Gather data for your insert
-Your product_super_attribute_id will be one more than the highest existing product_super_attribute_id.
-You can get the product_id from the CMS.
-Get the attribute id of the attribute that you are looking for from the eav_attribute table.
-position can be whatever you like-default is 0. If attributes have the same position, they will be sorted by initial insertion order.
4) Insert your data in the the catalog_product_super_attribute table, by your preferred method.

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*