我已经使用以下位置的代码在管理产品图像选项卡中添加了图像标题字段
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>我已经在ps_image表中添加了image_caption字段
imageLine({$image->id}, "{$image->getExistingImgPath()}", {$image->position}, "{if $image->cover}enabled{else}forbbiden{/if}", assoc," {$image->image_caption}");使用上面从表.now中检索的数据,我在更新image_caption field.how以更新该字段时遇到了困难?
发布于 2013-08-14 00:30:55
imageLine JS函数中只有5个参数,如下所示
function imageLine(id, path, position, cover, shops)你需要像这样编辑这个函数:
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);
....
}我希望这会对你有所帮助。
https://stackoverflow.com/questions/17290060
复制相似问题