Ronny
Ronny

Reputation: 541

magento - default attribute set when making new products

i have several attribute sets in my magento store. (v. 1.6.2)

When i make a new product "socks" is the default attribute set. But i would like "clothing" to be the default.

How can i change this?

I hope anyone can help.

Upvotes: 3

Views: 3143

Answers (4)

mstephenson
mstephenson

Reputation: 309

It is possible to accomplish what you want by editing the database directly. Only do this if you are comfortable with MySQL commands or another tool like phpMyAdmin.

To make this change you will need to do two things.

  1. Get the ID of your new attribute set, in this case your "clothing" attribute set. You can locate the id in the eav_attribute_set database table or in the browser URL when editing the attribute set from the Magento admin area. I prefer to just use the database since we need to go in there anyways to make the change.

    Table Name : eav_attribute_set
    Column Name: attribute_set_id

    Look for the row in the table that has the name you used when you created the new set - it should be pretty obvious, you'll see all the attribute set names in the column called attribute_set_name

  2. Once you have the preferred attribute set ID you then need to visit the eav_entity_type table and update the value in default_attribute_set_id column for the row whereentity_type_id = 4 and entity_type_code = catalog_product. In a fresh installation of Magento, the value to look for in this column is also 4.

    Table Name : eav_entity_type
    Column Name: default_attribute_set_id

    Done! Once you've changed the id value you will notice your preferred attribute set is the one selected by default the next time you go to create a new product. I believe this is what the question was asking for.

NOTE: This should work for both Magento 1 and 2. At the time of writing this post the current Magento versions are: 1.9.2.4 and 2.0.7

Upvotes: 0

George Powell
George Powell

Reputation: 26

Original question didn't seem to get answered here and I was looking for what Ronny also wanted.

Found there has been an extension released that does it simply for you.

http://www.magentocommerce.com/magento-connect/default-attribute-set.html

Upvotes: 1

MagePal Extensions
MagePal Extensions

Reputation: 17656

To change an existing product attribute set, you can Create a new Attribute Set that contain all the attributes you need

You can either install this extension (Change Attribute Set) or make the changes in the database (you will need to know the products id and attribute set id)

To manually change (Always backup before making changes):

Go to eav_attribute_set table and look for the attribute_set_id of the newly create attribute set (you could also get this in the admin by look at the url www.xxxx/edit/id/10/key/xxx on Edit Attribute Set 'xxxx' page)

After you have a list of all the product ids and corresponding attribute set ids, then go to the table below and update those fields

Table Name : catalog_product_entity
Field Name : attribute_set_id
Field Name : entity_id // is product_id 

Another way is to delete those product and recreate using the new attribute set.

Upvotes: 0

Igor S
Igor S

Reputation: 1895

Unfortunately, it's not possible. You should create new product.

Upvotes: 0

Related Questions