1

I've been using Kus's answer found here:

Images in Magento widgets

However moving from my local to the testing server it looks like the class is not being read and I lose the button to upload.

This is my image block

 <widgetpress_list type="springwidget_press/List" module="springwidget_press">
   ....
  <image>
    <label>Press Image</label>
    <description>Image to be displayed on the page</description>
    <visible>1</visible>
    <type>label</type>
    <helper_block>
      <type>springwidget_press/imagechooser</type>
      <data>
        <button translate="open">
          <open>Insert Image...</open>
        </button>
      </data>
    </helper_block>
      </image>
    ....
   </widgetpress_list>

This is my class name in a file called app/code/local/Spring/Press/Block/ImageChooser.php

class Spring_Press_Block_ImageChooser extends Mage_Adminhtml_Block_Template
{
public function prepareElementHtml(Varien_Data_Form_Element_Abstract $element)
{

.
.
.
}
}

Any ideas?

Community
  • 1
  • 1
i.bajrai
  • 87
  • 5

1 Answers1

0

I would not use a helper block but a custom field type.

Please have a look at my solution on Github. A sample implementation is available here.

An installation package is available on Magento Connect as well.

Gerrit
  • 99
  • 1
  • 3
  • That might be what is causing the issue, thanks for your reply! I will investigate and if it works, mark this correct. – i.bajrai Oct 02 '12 at 06:12