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
模板屋版权所有 © 转载时必须以链接形式注明出处!

扫一扫联系我们
7x24小时服务
在线咨询
qqcodeback_top
温馨提示

确定取消
温馨提示

关闭