首页 > 代码库 > ecshop 浏览历史样式的修改

ecshop 浏览历史样式的修改

ecshop的浏览历史的样式,例如我修改的是只让浏览历史显示浏览历史的商品名称 而不显示浏览历史的商品的价格和图片
首先找到要修改 的文件includes\lib_insert.php
找到函数function insert_history()
函数里面的


$str.=‘<ulclass="clearfix"><liclass="goodsimg"><ahref="http://www.mamicode.com/‘.$goods[‘url‘].‘"target="_blank"><imgsrc="http://www.mamicode.com/‘.$goods[‘goods_thumb‘].‘" alt="‘.$goods[‘goods_name‘].‘"class="B_blue"/></a></li><li><ahref="http://www.mamicode.com/‘.$goods[‘url‘].‘" target="_blank"title="‘.$goods[‘goods_name‘].‘">‘.$goods[‘short_name‘].‘</a><br/>‘.$GLOBALS[‘_LANG‘][‘shop_price‘].‘<fontclass="f1">‘.$goods[‘shop_price‘].‘</font><br/></li></ul>‘;


就是浏览历史的样式 下面一行 $str .= ‘<ulid="clear_history"><aonclick="clear_history()">‘ .$GLOBALS[‘_LANG‘][‘clear_history‘] .‘</a></ul>‘;是“清空”字样的链接

我修改的只显示浏览历史的商品名称修改的最终代码如下:

$str.=‘<ulclass="clearfix"><li><ahref="http://www.mamicode.com/‘.$goods[‘url‘].‘" target="_blank"title="‘.$goods[‘goods_name‘].‘">‘.$goods[‘short_name‘].‘</a><br/></li></ul>‘