1

All of the products in my store are created automatically by our stock control programme, which means that they are created as simple products with no attribute_sets. I now want to create configurable products to associate some of the individual simple products to. For example we have gloves of different sizes in stock and I have created an attribute_set of glove sizes and created a configurable parent product so customers can choose size from a dropdown which will then pick the associated child product.

Is there a way I can do this without having to recreate the simple products?

1

Access to your database (CLI or PHPmyAdmin, other method)

  1. Retrieve your attribute_set_id

    SELECT * FROM eav_attribute_set WHERE entity_type_id = 4;

Result like :

+------------------+----------------+--------------------+------------+
| attribute_set_id | entity_type_id | attribute_set_name | sort_order |
+------------------+----------------+--------------------+------------+
|                4 |              4 | Default            |          1 |
|                9 |              4 | my_attr_set        |          0 |
+------------------+----------------+--------------------+------------+
  1. Find all the product IDs that you want to update

  2. Update

    UPDATE catalog_product_entity set attribute_set_id = {attr_set_id here} WHERE entity_id IN ({products_ids here});

{attr_set_id here} the attribute set id found in step 1

{products_ids here} product ids separated by a comma. ex. IN (12,13,14,128,129);

0

You can mass import in backend with CSV files.

Export all your simple products, edit the CSV file to set the attributes values, then import it.

  1. Go to system -> import/export -> export

    • Entity type : Products
    • Format : CSV

    Set the filter to limit the export to the products you want then... click continue

  2. Edit the file you've downloaded and change the attributes values

  3. Go to system -> import/export -> export

    • Entity type : Products
    • Beahvior : Append
    • Your edited file
  • I've done that now, changed the attribute_set to match that of the configurable product, imported it to the site, re-indexed the site, cleared and flushed the cache, to no avail. Am I missing a step here or am I missing something else? – TheKnightlyWebGuy Mar 20 '15 at 14:20
  • Not sure you can change the attribute_set in import. – Pilou Mar 20 '15 at 15:02
  • In that case, what is it I need to change to retroactively add attributes to simple products so they can be linked to a configurable product? – TheKnightlyWebGuy Mar 20 '15 at 15:17
  • Just realised my question wasn't clear about what I wanted to edit and I have updated it accordingly – TheKnightlyWebGuy Mar 20 '15 at 15:23
  • I thought you want to update attributes on a large amount of product. But in fact, just to be sure, you need to set an attribute_set to uncomplete products, is that right ? – Pilou Mar 20 '15 at 15:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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