一、浏览历史调用商品图片
打开/includes/Lib_insert.php
1、 查找:FROM ‘ . $GLOBALS['ecs']->table(’goods’) . 跳到81行
把: $sql = ‘SELECT goods_id, goods_name FROM ‘ . $GLOBALS['ecs']->table(’goods’) .
” WHERE $where AND is_on_sale = 1 AND is_alone_sale = 1 AND is_delete = 0″;
代替成:
$sql = ‘SELECT goods_id, goods_name, goods_thumb , market_price,shop_price,promote_price FROM ‘ . $GLOBALS['ecs']->table(’goods’) .
” WHERE $where AND is_on_sale = 1 AND is_alone_sale = 1 AND is_delete = 0″;
2、查找: $goods_name = htmlspecialchars($res[$val]['goods_name']); 跳到95行
把:$goods_name = htmlspecialchars($res[$val]['goods_name']);
if ($goods_name)
{
$short_name = $GLOBALS['_CFG']['goods_name_length'] > 0 ? sub_str($goods_name, $GLOBALS['_CFG']['goods_name_length']) : $goods_name;
$str .= ‘<li><a href=”‘ . build_uri(’goods’, array(’gid’ => $val), $goods_name). ‘” title=”‘ . $goods_name . ‘”>’ . $short_name . ‘</a></li>’;
}
代替成:
/修改浏览历史*/
$goods_name = htmlspecialchars($res[$val]['goods_name']);
$goods_thumb = $res[$val]['goods_thumb'];
$market_price = $res[$val]['market_price'];
$shop_price = $res[$val]['shop_price'];
$promote_price = $res[$val]['promote_price'];
if ($promote_price > 0){
$goods_price = ‘促销价:’.price_format($res[$val]['promote_price']);
}
elseif ($shop_price > 0){
$goods_price = ‘网店价:’.price_format($res[$val]['shop_price']);
}
else{
$goods_price = ‘门店价:’.price_format($res[$val]['market_price']);
}
更多 »