在复制商品的时候有一段处理图片路径的代码
2016-07-07 15:03 来源:www.chinab4c.com 作者:ecshop专家
if (isset($GLOBALS['shop_id']) && ($GLOBALS['shop_id'] > 10) && !empty($goods['original_img'])) { $goods['goods_img'] = get_image_path($_REQUEST['goods_id'], $goods['goods_img']); $goods['goods_thumb'] = get_image_path($_REQUEST['goods_id'], $goods['goods_thumb'], true); } /* 图片列表 */ $sql = "SELECT * FROM " . $ecs->table('goods_gallery') . " WHERE goods_id = '$goods[goods_id]'"; $img_list = $db->getAll($sql); /* 格式化相册图片路径 */ if (isset($GLOBALS['shop_id']) && ($GLOBALS['shop_id'] > 0)) { foreach ($img_list as $key => $gallery_img) { $gallery_img[$key]['img_url'] = get_image_path($gallery_img['goods_id'], $gallery_img['img_original'], false, 'gallery'); $gallery_img[$key]['thumb_url'] = get_image_path($gallery_img['goods_id'], $gallery_img['img_original'], true, 'gallery'); } } else { foreach ($img_list as $key => $gallery_img) { $gallery_img[$key]['thumb_url'] = '../' . (empty($gallery_img['thumb_url']) ? $gallery_img['img_url'] : $gallery_img['thumb_url']); } } } 而复制的时候已经把goods[goods_id]赋值为0,貌似这段代码不起什么作用,因为$img_list永远都是空的,不知道为什么要加这段代码 |
最近更新
常用插件
- ecshop商品分类名称增加样
ecshop插件介绍:本插件可以方便在后台管理,为ecshop商品分类名称增加样...
- ecshop2.7.1打印发货单插件
ecshop2.7.1打印发货单插件介绍:ecshop2.7.1和以前的ecshop版本不一样,ecs...
- ecshop二次开发详细页面生
插件介绍: ECSHOP系统,在很多时候,很多商品没有人购买,不但购买的人...
- ecshop二次商品订购人信息
ecshop二次商品订购人信息填写插件,有时候给朋友送花,或者是送礼品的...
- ecshop分类批量扩展插件
ecshop分类批量扩展插件,这个插件是ecshop插件里面比较核心的插件。我们...
ecshop热门问答
ecshop热门资料
b4cseo
ecshop模糊
ecshop凡客诚品
ecshop手机号码
ecshop网页抽奖程序
ecshop收集
ecshop探讨
ecshop406
ecshop淘宝分类
ecshop宝马3系
ecshopILLEGAL
ecshopEshop
ecshopqihom
ecshop淘宝助手
ecshop短信插件
ecshop原版
ecshop开关
ecshop超限
ecshop日历
zencart订单
ecshop黑影
ecshop图片目录
ecshop合租
ecshop库存插件
ecshop抽奖
ecshop微录手表
ecshop卓越
ecshopapproved
ecshopchanged
ecshop影响力