2012-09-20 66 views
1

我一直在使用庫什的答案在這裏找到:圖片繼續

Images in Magento widgets

但是從我的地方到它看起來像類的測試服務器移動沒有被讀取,我失去的按鈕上傳。

這是我的圖像塊

<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> 

這是在一個文件我的類名名爲app /代碼/本地/春/新聞/座/ ImageChooser.php

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

. 
. 
. 
} 
} 

任何想法?

回答

0

我不會使用幫助塊,而是自定義字段類型。

請查看我在Github上的解決方案。示例實現可用here

安裝包也可在Magento Connect上找到。

+0

這可能是導致此問題的原因,謝謝您的回覆!我會調查,如果它的工作,標記這是正確的。 –