Question

I'm new to Magento so excuse me if i"m asking anything evident. I have a request to change attribute set of 100+ products (they were created by a previous manager). How can I do that without re-cresting all these products?

Was it helpful?

Solution

This is sort of tricky question. The thing is that attribute set pretty much defines product fundamental parameters and thus you can't really "change" attribute set as you can't "change" your shoe to computer. There's a number of third party extensions and tools that allow you to convert one attribute set to another, but even with them it's complicated process. Perhaps the best way to do it is to export product, update product structure (add missing attributes, modify existing ones), remove old products and import modified data. All in all it requires good knowledge what you're doing.

Usually all of above is not worth the time and effort involved and it's easier/cheaper just to create your products again.

OTHER TIPS

If you want to change the attribute set id directly using sql (which may be faster for a one off issue)

#attribute_set_id = new attribute set id
#entity_id = product id

UPDATE `catalog_product_entity` SET `attribute_set_id`='12' WHERE `entity_id`='3';

or

UPDATE `catalog_product_entity` SET `attribute_set_id`='12' WHERE `entity_id` in '1,3,4,5,...';

Assuming that the previous attribute set is similar and the new attribute set will inherit all it attributes

This function will do the trick for you:

$product->setAttributeSetId(12)->save();

It is not a one step process. Check this LINK, here you can see an extension is shared which can do this task. This question is similar to what you require.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top