Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Create a new price attribute for category in Magento
<?php
$catalogInstaller = new Mage_Catalog_Model_Resource_Setup('core_setup');
$catalogInstaller->addAttribute('catalog_category', 'myattribute_code', array(
'type' => 'decimal',
'label' => Mage::helper('myHelper')->__('Price From'),
'input' => 'text',
'input_renderer' => 'adminhtml/catalog_product_helper_form_price',
'required' => false,
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
'sort_order' => 9999,
'group' => 'General Information',
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment