北京网店建设
网站地图
RSS订阅
匿名投稿
开网店送空间和顶级域名
您的位置:北京网店建设 > 网店建设 > ecshop模板开发

ecshop模板在购物车或结算页面显示商品的品牌

作者:admin 来源:未知 日期:2010-4-23 17:15:48 人气: 标签:ecshop模板定制 ecshop免费模板 ecshop模板 ecshop模板制作 ecshop模板开发 ecshop模板操作
导读:1、修改 includes/lib_order.php 文件找到 cart_goods() 函数部分找到 $arr[$key]['formated_subtotal'] = price_format($value['subtota
1、修改 includes/lib_order.php 文件
找到 cart_goods() 函数部分
找到
  1. $arr[$key]['formated_subtotal']     = price_format($value['subtotal'], false);
复制代码
(大概在873行)
在它下面增加下面代码
  1. $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']}'";
  2.   $goods_brand = $GLOBALS['db']->getOne($sql);
  3.   $arr[$key]['goods_brand']=$goods_brand;
复制代码
找到 get_cart_goods() 函数部分
找到
  1. $goods_list[] = $row;
复制代码
(大概在1603行)
在它上面增加下面代码
  1. $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']}'";
  2.   $goods_brand = $GLOBALS['db']->getOne($sql);
  3.   $row['goods_brand']=$goods_brand;
复制代码
2、修改 模板文件 flow.dwt 文件
找到
  1. <!-- {if $goods.is_shipping} -->(<span style="color:#FF0000">{$lang.free_goods}</span>)<!-- {/if} -->
复制代码
在他后面增加代码
{$goods.goods_brand}

找到
  1. <a href="goods.php?id={$goods.goods_id}" target="_blank"><img src="{$goods.goods_thumb}" border="0" title="{$goods.goods_name|escape:html}" /></a><br />
复制代码
在它后面增加代码
品牌:{$goods.goods_brand})
本文连接地址:http://www.511sj.com/html/wangdianjianshe/ecshop_mobankaifa/1140.Html

编辑整理:北京网店建设 ecshop模板 ecshop模板

共有:条评论信息评论信息
发表评论
姓 名:
验证码: