I've created a new attribute for a module
app/code/local/AtlanticBT/Featured/Model/Resource/Eav/Mysql4/Setup.php
<?php
class AtlanticBT_Featured_Model_Resource_Eav_Mysql4_Setup
extends Mage_Eav_Model_Entity_Setup
{
public function getDefaultEntities()
{
return array(
'catalog_product' => array(
'entity_model' => 'catalog/product',
'attribute_model' => 'catalog/resource_eav_attribute',
'table' => 'catalog/product',
'additional_attribute_table' => 'catalog/eav_attribute',
'entity_attribute_collection' => 'catalog/product_attribute_collection',
'attributes' => array(
'featured' => array(
'group' => 'General',
'type' => 'int',
'backend' => '',
'frontend' => '',
'label' => 'Featured',
'input' => 'select',
'class' => '',
'source' => 'eav/entity_attribute_source_boolean',
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
'visible' => true,
'required' => false,
'user_defined' => true,
'default' => false,
'searchable' => true,
'filterable' => true,
'comparable' => false,
'visible_on_front' => true,
'visible_in_advanced_search' => true,
'used_in_product_listing' => true,
'used_for_sort_by' => true,
'unique' => false,
),
),
),
);
}
}
app/code/local/AtlanticBT/Featured/sql/featured_setup/mysql4-install-0.1.0.php
<?php
$this->installEntities();
can I alter this attribute to only show on configurable products? would that be a class in the backend or frontend option which controls this functionality?
setupclass in the sql scripts, there is just the extra layer of abstraction that allows this extra customization. Does that make sense?