Reputation: 541
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
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.
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
attribute_set_name
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
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
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
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