ecshop商品相册_ecshop商品相册显示顺序为正序实现教程

ECSHOP教程 来源: ECSHOP教程网www.ecshop119.com 时间:2020-12-18 ECSHOP教程分类:ECSHOP商品详情页修改

我们在ECSHOP商城后台更改商品图片后,这张图片就会置于商品相册的最后一个,于是前台显示放大图就会于相册第一张不同,这种情况很是不妙应当如何解决呢?今天由ECSHOP教程网为您详细介绍修改方法教程,修改方法很简单:


打开include/lib_goods.php文件,找到如下代码

$sql = 'SELECT img_id, img_url, thumb_url, img_desc' .
' FROM ' . $GLOBALS['ecs']->table('goods_gallery') .
" WHERE goods_id = '$goods_id' LIMIT " . $GLOBALS['_CFG']['goods_gallery_number'];
$row = $GLOBALS['db']->getAll($sql);
把上面那段代码修改成:
$sql = 'SELECT img_id, img_url, thumb_url, img_desc' .
' FROM ' . $GLOBALS['ecs']->table('goods_gallery') .
" WHERE goods_id = '$goods_id' ORDER BY img_id ASC LIMIT " . $GLOBALS['_CFG']['goods_gallery_number'];
$row = $GLOBALS['db']->getAll($sql);
后台清理下缓存,测试下效果吧!


本文模板屋原创地址: https://www.ecshop119.com/ecshopjc-1079.html
模板屋版权所有 © 转载时必须以链接形式注明出处!

ECSHOP模板屋
ecshop开发团队 ecshop开发中心 ecshop模板制作 ecshop模板屋
ECSHOP
ecshop下载 ecshop安装教程 ecshop在线演示 ecshop后台测试
ECSHOP二次开发手册
ecshop教程 ecshop二次开发 ecshop模板教程 ecshop微信配置
ECSHOP商城网站建设
ecshop空间域名 ecshop商城建设 ecshop模板修改 ecshop开发定制
服务支持:7X24小时 151 059 55077
ECShop二次开发
ecshop搭建
qqtelcodeback_top
温馨提示

确定取消
温馨提示

关闭