How do you change an eav attribute properties during the installation of a module.
Specifically, i want to change a product attribute from being to required to not required.
I am currently merging the updated product attributes in the getDefaultEntities call in my modules setup but its giving wierd 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 loosing its Frontend Label
To change the product attribute set in Magento, log in to the admin panel and go to Catalog > Manage Products. Select the needed Magento products and choose Change Attribute Set from the Action dropdown right on the grid.
Edit an attribute. On the Admin sidebar, go to Marketing > Channels > Amazon. Click Attributes in the left-side menu, locate an Amazon attribute, and click Edit in the Action column. To enable or disable the syncing of the Amazon values to the linked Magento attribute, set Is Active to Yes or No .
/* @var $installer Mage_Catalog_Model_Resource_Setup */
$installer->updateAttribute('catalog_product','short_description','is_required',0);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With