This is how you can update attribute parameters, the one saved in catalog_eav_attribute table
In this exemple we will enable the “used_in_product_listing” params of the “code_catalogue” attribute
1 2 3 4 5 | $attributeId = Mage::getResourceModel( 'eav/entity_attribute' )->getIdByCode( 'catalog_product' , 'code_catalogue' ); if ( $attributeId ) { $attribute = Mage::getModel( 'catalog/resource_eav_attribute' )->load( $attributeId ); $attribute ->setUsedInProductListing(1)->save(); } |
And that’s all.