0

class Magestore_Giftvoucher_Block_Product_Upload extends Mage_Adminhtml_Block_Media_Uploader {

public function __construct()
{
    parent::__construct();
    $this->setId($this->getId() . '_Uploader');
    $this->setTemplate('');
    $this->getConfig()->setUrl($this->getUrl('giftvoucher/index/customUpload'));
    $this->getConfig()->setParams();
    $this->getConfig()->setFileField('image');
    $this->getConfig()->setFilters(array(
        'images' => array(
            'label' => Mage::helper('adminhtml')->__('Images (.gif, .jpg, .png)'),
            'files' => array('*.gif', '*.jpg', '*.png')
        )
    ));
    $this->getConfig()->setWidth(32);
}

public function getDeleteButtonHtml()
{
    $this->setChild(
        'delete_button', $this->getLayout()->createBlock('adminhtml/widget_button')
            ->addData(array(
                'id' => '{{id}}-delete',
                'class' => 'delete',
                'type' => 'button',
                'label' => Mage::helper('adminhtml')->__(''),
                'onclick' => $this->getJsObjectName() . '.removeFile(\'{{fileId}}\')',
                'style' => 'display:none'
            ))
    );
    return $this->getChildHtml('delete_button');
}

public function getDataMaxSize()
{
    $dataSize = Mage::helper('giftvoucher')->getInterfaceConfig('upload_max_size');
    if (is_nan($dataSize) || $dataSize <= 0) {
        $dataSize = 500;
    }
    return $dataSize . 'K';
}

}

  • Since this is a paid extension, I suggest you contact the editor. – Julien Lachal Nov 14 '16 at 15:54
  • Hi the error line is this $this->getConfig()->setUrl($this->getUrl('giftvoucher/index/customUpload')); Do you have any idea what to edit ? – Jerry Cris Buhisan Nov 15 '16 at 17:37
4

Had this same error come up for me also. What I did was go over mage store site and login into your account and download the latest version of the gift card extension (currently 4.6). Update your copy of the extension on your site. I was still getting this error after updating so I edited the file upload.php file (located at: /app/code/local/Magestore/Giftvoucher/Block/product/upload.php). Change line 43 if (version_compare($magentoVersion, '1.9.3', '>=')){ to if(class_exists("Mage_Uploader_Block_Abstract")){ and you will not get the error anymore

|improve this answer|||||

Not the answer you're looking for? Browse other questions tagged or ask your own question.