I am trying to configure attributes and attributes automatically using a setup script. The script works and all attributes are added to the sets, no problem with this ... however, when I look at the attributes visible_on_front, used_in_product_listingand are globalset incorrectly. This is what I have:
$installer->addAttribute('catalog_product', '<attribute_code>', array(
'group' => 'General',
'input' => 'date',
'type' => 'datetime',
'label' => '<some_label>',
'backend' => 'eav/entity_attribute_backend_datetime',
'is_global' => 0,
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
'is_visible_on_front' => 1,
'visible_on_front' => 1,
'used_in_product_listing' => 1,
));
Does anyone know how I can fix this to make it work?
source
share