2

I am trying to create a WYSIWGY field in category page in magento backend but it doesn't seem to work. I am writing an install script as:

'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',                        
                ),

But it only shows the textarea but not the WYSIWGY editor. Any idea where I'm doing wrong?

Hum
  • 531
  • 2
  • 12
  • 30

1 Answers1

3

Try this instead. Basically it's just 'wysiwyg' => true to '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',                        
            ),
seanbreeden
  • 6,104
  • 5
  • 36
  • 45
  • This doesn't work either. Its still showing the textarea without wysiwyg editor. – Hum Feb 09 '12 at 14:13
  • I'm writing this in my Company/Module/Model/Resource/Eav/Mysql4/Setup.php but wysiwyg_enabled => true isn't working. Do I need to overwrite _prepareValues() function? – Hum Feb 09 '12 at 14:31
  • In your Setup.php did you extend Mage_Catalog_Model_Resource_Setup? – seanbreeden Feb 09 '12 at 14:42
  • NO, Im extending Mage_Eav_Model_Entity_Setup but never mind I have it working now. I just copied the _prepareValues($attr) function from code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Setup.php and stick that in my setup.php file and works. Thanks for the help... – Hum Feb 09 '12 at 15:10