I created a new attribute (“for example my_attribute”). Magento’s store already has many attribute sets (approx 20).
It’s a very time consuming process if I manually add the attribute to the sets because my server is very slow.
I want to assign this new attribute(“my_attribute”) to all attribute sets programmatically.
Can anyone can help me?
Thanks in advance.
As Attributes are not assigned with any attribute set then, you can delete that attribute you created and then create required attribute programmatically.
In the Magento wiki’s Programmatically Adding Attributes and Attribute Sets Section, It describes
createAttributeas the function that will solve your problem because it will create attributes and also assign them to attribute sets.Hope This Helps!!