首页建站经验 在Ecshop购物车或结算页面显示商品的品牌

在Ecshop购物车或结算页面显示商品的品牌

1、先打开 includes/lib_order.php 文件(建议使用editplus)找到 (大概是在873行)$arr[$key]['formated_subtotal'] = price_format($value['subtotal'], false);在它的下面增加…

1、

先打开 includes/lib_order.php 文件(建议使用editplus)

找到 (大概是在873行)

$arr[$key]['formated_subtotal'] = price_format($value['subtotal'], false);

在它的下面增加以下代码

$sql="select brand_name from ".$GLOBALS['ecs']->table('goods')." g left join " . $GLOBALS['ecs']->table("brand") . " b on g.brand_id=b.brand_id where goods_id='{$value['goods_id']}'";

$goods_brand = $GLOBALS['db']->getOne($sql);

$arr[$key]['goods_brand']=$goods_brand;

2、

下面这一步千万要认真,不能马虎,还是在includes/lib_order.php 文件中查找

先找到 get_cart_goods() 函数部分,然后再找到此函数中的一行代码

$goods_list[] = $row;

(注:此行代码在includes/lib_order.php中出现了两次,千万别找错了)

找到这行代码后,在它上面增加以下代码

$sql="select brand_name from ".$GLOBALS['ecs']->table('goods')." g left join " . $GLOBALS['ecs']->table("brand") . " b on g.brand_id=b.brand_id where goods_id='{$row['goods_id']}'";

$goods_brand = $GLOBALS['db']->getOne($sql);

$row['goods_brand']=$goods_brand;

2、

修改 模板文件 flow.dwt 文件

找到

({$lang.free_goods})

在他后面增加代码

{$goods.goods_brand}

找到


在它后面增加代码

(品牌:{$goods.goods_brand})

以上就是关于在Ecshop购物车或结算页面显示商品的品牌的方法,希望对大家有所帮助。

本文来自网络,不代表1号站长-站长学院|资讯交流平台立场。转载请注明出处: https://www.1cn.cc/jianzhan/jingyan/18940.html
上一篇ecshop配送方式出错lib_common.php on line 959
下一篇 ecshop二次开发50个小技巧
admin

作者: admin

这里可以再内容模板定义一些文字和说明,也可以调用对应作者的简介!或者做一些网站的描述之类的文字或者HTML!

为您推荐

评论列表()

    联系我们

    联系我们

    0898-88888888

    在线咨询: QQ交谈

    邮箱: email@wangzhan.com

    工作时间:周一至周五,9:00-17:30,节假日休息

    关注微信
    微信扫一扫关注我们

    微信扫一扫关注我们

    关注微博
    返回顶部