添加产品属性时出错

时间:2012-06-27 09:42:53

标签: magento attributes product catalog

我通过这个问题看了很多,而我看到很多帖子,但没有给出明确的magento解决方案。

当我尝试向产品添加属性时,我收到此错误:

"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

我在我的安装程序脚本中尝试这个:

$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();

更新:问题已解决我在编写课程名称时出错了

1 个答案:

答案 0 :(得分:0)

您可以检查sac_productattributes / attribute_source_type模型类是否确实存在。 即productattribute / attribute / source / type.php应该存在

相关问题