I am trying to display a custom attribute in the backend of magento on the category pages where the category levels are 2nd level.
I found an tutorial online which enabled me to add a custom attribute to the category pages. The code that I am currently using is:
require_once "app/Mage.php";
Mage::app()->setCurrentStore(Mage::getModel('core/store')->load(Mage_Core_Model_App::ADMIN_STORE_ID));
$installer = new Mage_Sales_Model_Mysql4_Setup;
$attribute = array(
'type' => 'text',
'label'=> 'Out of stock msg',
'input' => 'text',
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
'visible' => true,
'required' => false,
'user_defined' => true,
'default' => "",
'group' => "General Information"
);
$installer->addAttribute('catalog_category.level', 'out_of_stk', $attribute);
$installer->endSetup();
Any ideas as to how I go about only applying this to second level categories? Thanks