Magento module setup - change product attribute to optional

How do you change the properties of the eav attribute during module installation.

In particular, I want to change the product attribute so that it is not required.

I am currently combining updated product attributes in a call to getDefaultEntities in the module settings, but still get tighter results.

For example:

public function getDefaultEntities() { return array( 'catalog_product' => array( 'entity_attribute_collection' => 'catalog/product_attribute_collection', 'attribute_model' => 'catalog/resource_eav_attribute', 'table' => 'catalog/product', 'entity_model' => 'catalog/product', 'additional_attribute_table' => 'catalog/eav_attribute', 'attributes' => array( 'short_description' => array('required'=> false) ) ) ); } 

Results in the short_description field that lose its Frontend label

+7
source share
1 answer
 /* @var $installer Mage_Catalog_Model_Resource_Setup */ $installer->updateAttribute('catalog_product','short_description','is_required',0); 
+18
source

All Articles