ecshop 浏览历史样式的修改

ecshop的浏览历史的样式,例如我修改的是只让浏览历史显示浏览历史的商品名称 而不显示浏览历史的商品的价格和图片

首先找到要修改 的文件includes\lib_insert.php

找到函数 function insert_history()

函数里面的

$str.='<ul class=”clearfix”><li class=”goodsimg”><a href=”‘.$goods[‘url’].'” target=”_blank”><img src=”‘.$goods[‘goods_thumb’].'” alt=”‘.$goods[‘goods_name’].'” class=”B_blue” /></a></li><li><a href=”‘.$goods[‘url’].'” target=”_blank” title=”‘.$goods[‘goods_name’].'”>’.$goods[‘short_name’].'</a><br />’.$GLOBALS[‘_LANG’][‘shop_price’].'<font class=”f1″>’.$goods[‘shop_price’].'</font><br /></li></ul>’; 就是浏览历史的样式

下面一行 $str .= ‘<ul id=”clear_history”><a onclick=”clear_history()”>’ . $GLOBALS[‘_LANG’][‘clear_history’] . ‘</a></ul>’;是“清空”字样的链接

修改只显示浏览历史的商品名称修改的最终代码如下:$str.='<ul class=”clearfix”><li><a href=”‘.$goods[‘url’].'” target=”_blank” title=”‘.$goods[‘goods_name’].'”>’.$goods[‘short_name’].'</a><br /></li></ul>’

修改商品名称长度,找下代码

sub_str($row[‘goods_name’], $GLOBALS[‘_CFG’][‘goods_name_length’])

修改成:sub_str($row[‘goods_name’], 16,$append = true)

上面代码,16是标题长度,这里是按照中文字符算的,16就表示16个中文。$append = true表示当原标题超过18个字符时,以【…】结尾。

别想一下造出大海,必须先由小河川开始。

ecshop 浏览历史样式的修改

相关文章:

你感兴趣的文章:

标签云: