8

Basically the subject.

I have a simple product created with a particular attribute set. Is there a way to change the attribute set associated with this product without having to create a new one?

9

The attribute set reference is a column in the catalog_product_entity table. Changing that should change the attribute set.
So if you want to do it by code:

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

If you want to do it from an admin interface you can give this extension a try. Even if it says it's compatible with CE 1.6.1, I used it with success on EE 1.12 (that is equivalent to CE 1.7).

  • 2
    Let me add, that it is no good idea to change the attributeset, if you don't know what you are doing. There are data left in the database which might make problems. – Fabian Blechschmidt Jun 25 '13 at 16:52
  • 1
    @FabianBlechschmidt: You are right. Feel free to edit the answer. – Marius Jun 25 '13 at 16:56
  • 2
    +1 for the flagbit extension, would be the safest option... – Toon Van Dooren Jun 25 '13 at 18:53
  • 2
    @Fabien: you should elaborate on the "if you don't know what you are doing" part. As far as I can tell from looking at the DB, attribute set ID is linked only to the EAV attribute set table. After doing what Marius has suggested, the only issues I foresee are orphaned values in the catalog EAV tables as explained here, under the "technical background": magentocommerce.com/magento-connect/…. It would personally bother me to have those extra rows abandoned in the tables, so that coule be a "problem." :) – musicliftsme Aug 23 '13 at 15:53
  • 1
    Flagbit extentinon just sets new attribute set ID to product and saves it. It doesn't do anything special. – vsushkov Oct 28 '15 at 8:55

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.