<?php
$installer = $this;
$installer->startSetup();
$entityType = Mage::getSingleton('eav/entity_type')->loadByCode('catalog_product');
$entityTypeId = $entityType->getId();
$attributeSetName = 'Groupdeal';
$defaultSetId = Mage::getResourceModel('catalog/setup', 'core_setup')->getAttributeSetId($entityTypeId, 'Default');
$attributeSetModel = Mage::getModel('eav/entity_attribute_set')->load($attributeSetName,"attribute_set_name");
if(!$attributeSetModel->getId()){
$attributeSetModel->setEntityTypeId($entityTypeId)
->setAttributeSetName($attributeSetName);
try{
$attributeSetModel->save();
}
catch(Mage_Core_Exception $e){
}catch (Exception $e) {}
$attributeSetModel = Mage::getModel('eav/entity_attribute_set')->load($attributeSetModel->getId());
$attributeSetModel->initFromSkeleton($defaultSetId)
->save();
}
$installer = $this;
$installer->startSetup();
$entityType = Mage::getSingleton('eav/entity_type')->loadByCode('catalog_product');
$entityTypeId = $entityType->getId();
$attributeSetName = 'Groupdeal';
$defaultSetId = Mage::getResourceModel('catalog/setup', 'core_setup')->getAttributeSetId($entityTypeId, 'Default');
$attributeSetModel = Mage::getModel('eav/entity_attribute_set')->load($attributeSetName,"attribute_set_name");
if(!$attributeSetModel->getId()){
$attributeSetModel->setEntityTypeId($entityTypeId)
->setAttributeSetName($attributeSetName);
try{
$attributeSetModel->save();
}
catch(Mage_Core_Exception $e){
}catch (Exception $e) {}
$attributeSetModel = Mage::getModel('eav/entity_attribute_set')->load($attributeSetModel->getId());
$attributeSetModel->initFromSkeleton($defaultSetId)
->save();
}