国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網站 > 建站經驗 > 正文

在Ecshop購物車或結算頁面顯示商品的品牌

2024-04-25 20:43:09
字體:
來源:轉載
供稿:網友

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 文件

找到

<!-- {if $goods.is_shipping} -->(<span style="color:#FF0000">{$lang.free_goods}</span>)<!-- {/if} -->

在他后面增加代碼

{$goods.goods_brand}

找到

<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})

以上就是關于在Ecshop購物車或結算頁面顯示商品的品牌的方法,希望對大家有所幫助。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 亚东县| 余姚市| 凤冈县| 确山县| 山西省| 阜宁县| 页游| 大足县| 临泉县| 景谷| 马山县| 隆子县| 浙江省| 隆安县| 张掖市| 廊坊市| 永康市| 偏关县| 新泰市| 青浦区| 南和县| 文山县| 宾阳县| 且末县| 贡嘎县| 海宁市| 类乌齐县| 调兵山市| 黎平县| 昌黎县| 鄂伦春自治旗| 台湾省| 股票| 北安市| 长乐市| 太仓市| 广安市| 延长县| 南京市| 大田县| 黄山市|