Search code examples
magentoattributesproductcatalog

Error in adding product attribute


I look up a lot through this problem while i saw many post abt it but none gave a defined solution for magento.

when i try to add an attribute to product i get this error :

"Le modèle source "sac_productattributes/attribute_source_type" n'a pas été trouvé pour l'attribut "athlete_name_product" " 

The source model "sac_productattributes / attribute_source_type" was not found for attribute "athlete_name_product

i m trying this in my installer script :

$installer = $this;
$installer->startSetup();
$installer->addAttribute('catalog_product','athlete_name_product', array(
    'group'             => 'General',
    'type'              => 'varchar',
    'backend'           => '',
    'frontend'          => '',
    'label'             => 'Athlete name',
    'input'             => 'select',
    'class'             => '',
    'source'            => 'sac_productattributes/attribute_source_type',
    'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
    'visible'           => true,
    'required'          => false,
    'user_defined'      => false,
    'searchable'        => false,
    'filterable'        => false,
    'comparable'        => false,
    'visible_on_front'  => false,
    'unique'            => false,
    'apply_to'          => 'simple,configurable,bundle,grouped',
    'is_configurable'   => false,
));

$installer->endSetup();

Updated : problem solved i had mistake in writing class name


Solution

  • Can you check whether sac_productattributes/attribute_source_type model class actually exist or not. i.e. productattribute/attribute/source/type.php should exist