how to update the image fields in admin side of prestashop

I have added image caption fields in admin products images tab using follwing code in following location

admin/themes/default/template/controllers/products/images.tpl

<td id="td_image_id" class="pointer dragHandle center positionImage">
<input type="text"   name="image_caption"   value=image_caption  >  
</td>

I have added image_caption field in ps_image table

imageLine({$image->id}, "{$image->getExistingImgPath()}", {$image->position}, "{if $image->cover}enabled{else}forbbiden{/if}", assoc," {$image->image_caption}");

using above data retreive from the table .now i have stuggle with update the image_caption field.how to update that field ?


ANSWERS:


There are only 5 arguments in the imageLine JS function, see below

function imageLine(id, path, position, cover, shops)

You need to edit this function by something like that:

function imageLine(id, path, position, cover, shops, image_caption)
{
 line = $("#lineType").html();
 line = line.replace(/image_id/g, id);
 line = line.replace(/image_caption/g, image_caption);
 ....
}

I hope that will help you.



 MORE:


 ? How to remove a module from prestashop
 ? Prestashop Module: hooks and orders
 ? File upload in module configuration panel, Prestashop
 ? Modules Error in Prestashop Admin Panel
 ? How to get Javascript to work on the WP-Ecommerce Javascript for product entry?
 ? Wordpress ecommerce plugin allowing client to upload image
 ? wp-eCommerce from wordpress
 ? Customers can add variation to cart even when drop down menu not selected
 ? Store shopping cart items on cookie or DB on customized wordpress ecommerce plugin
 ? What's better for a blog + ecommerce website: WordPress or Symfony?