0

I want to add field image upload, file upload pdf, textarea field, date field

How can I add these fields in custom templatefor custom product attribute.

I saw below link

Adminhtml - How to add custom template for custom product attribute

but how to add images, editor for textarea, calender for date field.

Pradeep Singh
  • 248
  • 4
  • 12

1 Answers1

0

When adding your attributes via the installer script be sure to set the proper value for 'input':

$this->addAttribute('catalog_product', 'attribue_code', array(
    'input'         => 'textarea', //this makes the difference
));

to add images, you can use 'image', 'images', 'imagefile' or 'gallery', depending on what behaviour you want.

for calendar use 'date'-type.

for editor use 'editor'.

to get the wysiwyg-editor or the datepicker you might need to add the appropriate javascript libraries via your module's layoutfile too.

mybinaryromance
  • 151
  • 1
  • 11