ECSHOP二次开发,在用户中心的订单详情页显示商品缩略图
时间:2024年01月31日
/来源:网络
/编辑:佚名
用户中心 >> 我的订单 >> 查看订单详细,要如何加入商品缩略图呢??
1、修改 includes/lib_order.php ,找到 order_goods 函数部分,大概在467行左右,代码如下
$sql = "SELECT rec_id, goods_id, goods_name, goods_sn, market_price, goods_number, " .
"goods_price, goods_attr, is_real, parent_id, is_gift, " .
"goods_price * goods_number AS subtotal, extension_code " .
"FROM " . $GLOBALS['ecs']->table('order_goods') .
" WHERE order_id = '$order_id'";
修改成:
复制代码
$sql = "SELECT a.rec_id as rec_id, a.goods_id as goods_id, a.goods_name as goods_name, g.goods_thumb as goods_thumb, a.goods_sn as goods_sn, a.market_price as market_price, a.goods_number as goods_number, " .
"a.goods_price as goods_price, a.goods_attr as goods_attr, a.is_real as is_real, a.parent_id as parent_id, a.is_gift as is_gift, " .
"a.goods_price * a.goods_number AS subtotal, a.extension_code as extension_code " .
"FROM " . $GLOBALS['ecs']->table('order_goods') .
"as a , ". $GLOBALS['ecs']->table('goods') ." as g ".
" WHERE a.goods_id = g.goods_id and a.order_id = '$order_id'";
复制代码
2、修改 user_transaction.dwt 文件,
在
<th width="29%" align="center" bgcolor="#ffffff">{$lang.goods_attr}</th>
上面增加一行代码
<th align="center" bgcolor="#ffffff">缩略图</th>
紧接着在
<td align="left" bgcolor="#ffffff">{$goods.goods_attr|nl2br}</td>
上面增加一行代码
<td align=center bgcolor="#ffffff"><img src="{$goods.goods_thumb}" width="80" style="border:#999999 solid 1px"/></td>
PS:官方默认模板下进行修改的,如果使用的是其他模板,请对照着添加即可!
1、修改 includes/lib_order.php ,找到 order_goods 函数部分,大概在467行左右,代码如下
$sql = "SELECT rec_id, goods_id, goods_name, goods_sn, market_price, goods_number, " .
"goods_price, goods_attr, is_real, parent_id, is_gift, " .
"goods_price * goods_number AS subtotal, extension_code " .
"FROM " . $GLOBALS['ecs']->table('order_goods') .
" WHERE order_id = '$order_id'";
修改成:
复制代码
$sql = "SELECT a.rec_id as rec_id, a.goods_id as goods_id, a.goods_name as goods_name, g.goods_thumb as goods_thumb, a.goods_sn as goods_sn, a.market_price as market_price, a.goods_number as goods_number, " .
"a.goods_price as goods_price, a.goods_attr as goods_attr, a.is_real as is_real, a.parent_id as parent_id, a.is_gift as is_gift, " .
"a.goods_price * a.goods_number AS subtotal, a.extension_code as extension_code " .
"FROM " . $GLOBALS['ecs']->table('order_goods') .
"as a , ". $GLOBALS['ecs']->table('goods') ." as g ".
" WHERE a.goods_id = g.goods_id and a.order_id = '$order_id'";
复制代码
2、修改 user_transaction.dwt 文件,
在
<th width="29%" align="center" bgcolor="#ffffff">{$lang.goods_attr}</th>
上面增加一行代码
<th align="center" bgcolor="#ffffff">缩略图</th>
紧接着在
<td align="left" bgcolor="#ffffff">{$goods.goods_attr|nl2br}</td>
上面增加一行代码
<td align=center bgcolor="#ffffff"><img src="{$goods.goods_thumb}" width="80" style="border:#999999 solid 1px"/></td>
PS:官方默认模板下进行修改的,如果使用的是其他模板,请对照着添加即可!
新闻资讯 更多
热门文章
- 178Moban源码谈谈免费源码与收费源码的区别
- 2帝国CMS忘记后台登陆用户名、密码、认证码的解决方法
- 3帝国CMS(EmpireCMS) v7.5后台任意代码执行漏洞及具体修复方法
- 4帝国CMS和WordPress 哪个好?哪个适合建站?
- 5如何解决Discuz的密码错误次数过多请15分钟后登陆的问题
- 6帝国cms灵动标签取得内容和栏目链接地址
- 7emlog pro 注册码“开心”教程(如果有一天,emlog官方版 或者 emlog免费版 跑路了,那用户怎么办?)
- 8织梦CMS在nginx下设置伪静态方法(附nginx伪静态规则)
- 9帝国cms后台登录出现”您还未登录”怎么解决?
- 10帝国cms7.5忘记登录密码 和忘记登录认证码以及多次登录 失败被锁定解决办法