2

I want to be able to see what image filenames are when I edit products in admin.

Something like this is what I want although the text can go anywhere, e.g. below the images, as a title tag on the images, whatever.

enter image description here

I have tried looking for the template page for the images tab of the admin product view page to hopefully be able to just add on the filename either as a title tag on the image or beneath the text label box. However I have got stuck.

Any ideas?

1

1 Answer 1

1

You need to edit the template app/design/adminhtml/default/default/template/catalog/product/helper/gallery.phtml. Well, don't actually edit that one. Create a new admin theme and clone that file in your new theme.

There is some piece of html that acts as a template for all the images. It's the tr element that starts with

<tr id="<?php echo $_block->getHtmlId() ?>_template" class="template no-display">

Inside that tr element you will find a td like this:

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

all you need to do is change it to this

<td class="cell-label">__file__ <br /><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>

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.