require_once 'app/Mage.php';
Mage::app();
$setup = new Mage_Eav_Model_Entity_Setup('core_setup');
/*$setup->startSetup();
$setup->removeAttribute('catalog_category', 'categorytarget');
$setup->endSetup();*/
function createNewAttributeSet($name) {
Mage::app('default');
$modelSet = Mage::getModel('eav/entity_attribute_set')
->setEntityTypeId(4) // 4 == "catalog/product"
->setAttributeSetName($name);
$modelSet->save();
$modelSet->initFromSkeleton(4)->save(); // same thing
}
//Mage::app()->startSetup();
$setup->addAttribute('catalog_category', 'gemstone_image_hover', array(
'type' => 'varchar',
'label' => 'Gemstone Image Hover',
'input' => 'image',
'backend' => 'catalog/category_attribute_backend_image',
'required' => false,
'sort_order' => 99,
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
'group' => 'General Information'
));
echo "Success";
Mage::app();
$setup = new Mage_Eav_Model_Entity_Setup('core_setup');
/*$setup->startSetup();
$setup->removeAttribute('catalog_category', 'categorytarget');
$setup->endSetup();*/
function createNewAttributeSet($name) {
Mage::app('default');
$modelSet = Mage::getModel('eav/entity_attribute_set')
->setEntityTypeId(4) // 4 == "catalog/product"
->setAttributeSetName($name);
$modelSet->save();
$modelSet->initFromSkeleton(4)->save(); // same thing
}
//Mage::app()->startSetup();
$setup->addAttribute('catalog_category', 'gemstone_image_hover', array(
'type' => 'varchar',
'label' => 'Gemstone Image Hover',
'input' => 'image',
'backend' => 'catalog/category_attribute_backend_image',
'required' => false,
'sort_order' => 99,
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
'group' => 'General Information'
));
echo "Success";
Comments
Post a Comment