在magento后端创建所见即所得字段
我试图在magento后端的分类页面中创建WYSIWGY字段,但它似乎不起作用。我正在编写一个安装脚本,如下所示:在magento后端创建所见即所得字段,magento,backend,custom-backend,Magento,Backend,Custom Backend,我试图在magento后端的分类页面中创建WYSIWGY字段,但它似乎不起作用。我正在编写一个安装脚本,如下所示: 'fabric_and_care' => array( 'type' => 'text', 'backend' => '', 'frontend' => '',
'fabric_and_care' => array(
'type' => 'text',
'backend' => '',
'frontend' => '',
'label' => 'Fabric and Care Instructions',
'input' => 'textarea',
'class' => '',
'visible' => true,
'required' => false,
'user_defined' => true,
'default' => 0,
'searchable' => false,
'filterable' => false,
'comparable' => false,
'visible_on_front' => false,
'unique' => false,
'wysiwyg' => true,
'group' => 'general',
),
但它只显示文本区域,而不显示WYSIWGY编辑器。知道我哪里做错了吗?试试这个。基本上它只是
'wysiwyg'=>true
到'wysiwyg_enabled'=>true
'fabric_and_care' => array(
'type' => 'text',
'backend' => '',
'frontend' => '',
'label' => 'Fabric and Care Instructions',
'input' => 'textarea',
'class' => '',
'visible' => true,
'required' => false,
'user_defined' => true,
'default' => 0,
'searchable' => false,
'filterable' => false,
'comparable' => false,
'visible_on_front' => false,
'unique' => false,
'wysiwyg_enabled' => true,
'group' => 'general',
),
这也不行。它仍然显示没有wysiwyg编辑器的文本区域。我在我的Company/Module/Model/Resource/Eav/Mysql4/Setup.php中写这篇文章,但是wysiwyg_enabled=>true不起作用。我需要覆盖_prepareValues()函数吗?在你的Setup.php中,你是否扩展了Mage_Catalog_Model_Resource_安装程序?不,我正在扩展Mage_Eav_Model_Entity_安装程序,但没关系,我现在已经让它工作了。我刚刚从code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Setup.php复制了_prepareValues($attr)函数,并将其粘贴到我的Setup.php文件中,然后工作。谢谢你的帮助。。。