轻源码

  • QingYuanMa.com
  • 全球最大的互联网技术和资源下载平台
搜索
一起源码网 门户 ECShop网店 查看主题

ECSHOP购物车结算页面显示商品品牌

发布者: congyee | 发布时间: 2018-6-30 00:22| 查看数: 4869| 评论数: 1|帖子模式

1、先打开 includes/lib_order.php 文件(建议使用editplus)
找到 (大概是在873行)
  1. $arr[$key]['formated_subtotal']     = price_format($value['subtotal'], false);
复制代码
在它的下面增加以下代码
  1.     $sql="select brand_name from ".$GLOBALS['ecs']->table('goods')." g left join " .
  2. $GLOBALS['ecs']->table("brand") . " b on  g.brand_id=b.brand_id where goods_id='{$value['goods_id']}'";
  3.       $goods_brand = $GLOBALS['db']->getOne($sql);
  4.       $arr[$key]['goods_brand']=$goods_brand;
复制代码
2、下面这一步千万要认真,不能马虎,还是在includes/lib_order.php 文件中查找
先找到 get_cart_goods()  函数部分,然后再找到此函数中的一行代码
  1. $goods_list[] = $row;
复制代码
(注:此行代码在includes/lib_order.php中出现了两次,千万别找错了)
找到这行代码后,在它上面增加以下代码
  1.     $sql="select brand_name from ".$GLOBALS['ecs']->table('goods')." g left join " . $GLOBALS['ecs']->table("brand") .
  2. " b on  g.brand_id=b.brand_id where goods_id='{$row['goods_id']}'";
  3.       $goods_brand = $GLOBALS['db']->getOne($sql);
  4.       $row['goods_brand']=$goods_brand;
复制代码
3、修改 模板文件 flow.dwt 文件找到
  1. ({$lang.free_goods})
复制代码
在他后面增加代码
  1. {$goods.goods_brand}
复制代码
[/code]找到
  1. [/code]在它后面增加代码
  2. [code](品牌:{$goods.goods_brand})
复制代码

最新评论

790818 发表于 2022-7-1 21:21
磁力搜索软件源码

轻源码让程序更轻更快

QingYuanMa.com

工作时间 周一至周六 8:00-17:30

侵权处理

客服QQ点击咨询

关注抖音号

定期抽VIP

Copyright © 2016-2021 https://www.171739.xyz/ 滇ICP备13200218号

快速回复 返回顶部 返回列表