【发布时间】:2012-06-27 09:42:53
【问题描述】:
我通过这个问题查找了很多内容,虽然我看到很多帖子但没有一个为 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();
更新:问题解决了,我写错了类名
【问题讨论】:
标签: magento attributes product catalog