I've having issue when creating a new attribute set based on the existing one.

When you try to do this, it creates the new set but fails to bring over the attributes - it’s as if you simply created a blank set.

I'm trying hard looking into many database tables and class but can't find the actual problem.

any one has any experience in this issue, Please help



Create new product attribute set script

$newSetName = 'Apple';
$installer = new Mage_Eav_Model_Entity_Setup('core_setup');
$attributeSetID = Mage::getModel('catalog/product')->getDefaultAttributeSetId();
$entityTypeId = (int) $installer->getEntityTypeId('catalog_product');

$attributeSet = Mage::getModel('eav/entity_attribute_set')

if ($attributeSet->validate()) {
else {
    die('Attributeset with name ' . $newSetName . ' already exists.');


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.