I have imported about 15k products into magento from a system that has no variations or configurable products. These are all simple products that will eventually be used in a configurable product that has yet to be created.

What I am looking to do is to find a way to somehow programatically create 1 configurable product that has the right simple products that match the attributes in the config product. I have the ability to bring in some sort of custom field that might be used to associate which simple products go with the right config product, but I am at a loss to know the best way to do this other than doing it one by one using the admin panel.

2 Answers 2


So, you are looking for an outline on how you would go about this project. Unfortunately, the import is key in this scenario, so I hope you can rerun the import and make minor adjustments to the data if need be.

First off, the attributes that are used as configurable need to be marked as such. In the backend this is designated as "use for configurable products".

Secondly, you need a stem, a root that binds different versions of the same product together. Hopefully, this is the product name, the SKU or some other product code:

  • t-shirt, grey, size XL
  • t-shirt, grey, size L
  • t-shirt, blue, size XL

Here the stem is t-shirt, but only after seeing the third product.

  • TS-G1-XL
  • TS-G1-L
  • TS-B25-XL

Same as above but now with some product code. Now, humans aren't the most consistent species in the world, so you need to look for something that is either consistent enough to cover the 80/20, or is systematic, like the product code above and that can be parsed into sections using the dash as separator.

In both matching algorithms you need to be careful to not match too many. If you have a t-shirt store, you don't want to end up with one big configurable product. On the flip side, without the blue t-shirt in the example, the stem would be t-shirt, grey and the color attribute would be missed.

Hope this helps you along.


Here is my advice:

  1. You should create that configurable Product first, with at least one associated simple product.
  2. Export these two products in a CSV file.
  3. read the exported CSV file to know how the file format should look like(the order, the attribute value, what can left blank.. etc.) , and update your 15k simple product details in this format.
  4. Import the updated CSV file back to magento.
  5. In the configurable product --> Associated product section. Find "Any" product that have the named attribute-set, then "check" on all those product.
  6. The simple product should now become associated product of this configurable product.

Hope this can help!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.