Created
August 12, 2010 15:27
-
-
Save alistairstead/521155 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$installer = $this; | |
$installer->startSetup(); | |
$setup = new Mage_Eav_Model_Entity_Setup('core_setup'); | |
$entityTypeId = Mage::getModel('catalog/product')->getResource()->getTypeId(); | |
$setup->addAttribute($orderEntityTypeId, 'remove_from_back_order', array( | |
'group' => 'Fulfillment API', | |
'label' => 'Remove from back order upon fullfiller API update', | |
'type' => 'int', | |
'input' => 'boolean', | |
'default' => '0', | |
'class' => '', | |
'backend' => '', | |
'frontend' => '', | |
'source' => '', | |
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL, | |
'visible' => true, | |
'required' => true, | |
'user_defined' => false, | |
'searchable' => false, | |
'filterable' => false, | |
'comparable' => false, | |
'visible_on_front' => false, | |
'visible_in_advanced_search' => false, | |
'unique' => false | |
)); | |
$installer->endSetup(); | |
// rebuild flat product catalog - to make new attributes visible in the system | |
Mage::getResourceModel('catalog/product_flat_indexer')->rebuild(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment