Posted about 5 years ago. Visible to the public. Linked content.

Creating a New Attribute Set Programatically

Copy
$entityTypeId = Mage::getModel('catalog/product') ->getResource() ->getEntityType() ->getId(); $attributeSet = Mage::getModel('eav/entity_attribute_set') ->setEntityTypeId($entityTypeId) ->setAttributeSetName('test_set'); $attributeSet->validate(); $attributeSet->save(); $attributeSet->initFromSkeleton($skeletonID)->save();

You need to save before you do initFromSekeleton().

Owner of this card:

Avatar
Mike Whitby
Last edit:
about 5 years ago
Posted by Mike Whitby to Magento
This website uses cookies to improve usability and analyze traffic.
Accept or learn more