0

I have followed this : Adding an extra text area in product images tab backend post to add text field, Now field is showing but i am not getting the value in observer. Here is data :

2017-01-31T06:02:06+00:00 DEBUG (7): Array
(
    [images] => Array
        (
            [0] => Array
                (
                    [value_id] => 2347
                    [file] => /b/h/bh_tread.jpg
                    [product_id] => 1673
                    [label] => BH Fitness S7Ti Treadmill
                    [position] => 1
                    [title] => 
                    [disabled] => 0
                    [label_default] => BH Fitness S7Ti Treadmill
                    [position_default] => 1
                    [title_default] => 
                    [disabled_default] => 0
                    [url] => http://localhost/gym/media/catalog/product/b/h/bh_tread.jpg
                    [removed] => 0
                )

                   )

    [values] => {"image":"\/b\/h\/bh_tread.jpg","small_image":"\/b\/h\/bh_tread.jpg","thumbnail":"\/b\/h\/bh_tread.jpg"}
)

I want add a text field in image section same as Label field as shown in below pic.

I have added the following code in gallery.phtml

 <td class="cell-label"><input type="text" <?php if($_block->getElement()->getReadonly()):?> disabled="disabled"<?php endif;?> class="input-text" onkeyup="<?php echo $_block->getJsObjectName(); ?>.updateImage('__file__')" onchange="<?php echo $_block->getJsObjectName(); ?>.updateImage('__file__')" /></td>

enter image description here

1

For more info please go here:
http://sarathlal.com/create-and-use-custom-image-attribute-in-magento/

EDIT:

I see.
It should works:
Adding an extra text area in product images tab backend

  • I have tried it but they are radio type i need text filed instead – Kanika Jan 30 '17 at 9:54
  • let me try this one – Kanika Jan 30 '17 at 10:06
  • is it working fine? – Konrad Siamro Jan 30 '17 at 10:47
  • I working on it, once it will be completed, I will accept your answer thanks for your support – Kanika Jan 30 '17 at 10:49
  • I see. Good luck ;) – Konrad Siamro Jan 30 '17 at 10:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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