代码修改:
1.在 includes/lib_goods.php 文件中找到function get_goods_info($goods_id)
在此函数中找到代码:
/* 获得商品的销售价格 */
$row['market_price'] = price_format($row['market_price']);
$row['shop_price_formated'] = price_format($row['shop_price']);
然后在此代码下面加上如下一段代码即可实现:
/* 获得有规格属性的商品的销售价格范围 */
$sql = "SELECT SUM(max_attr_price) AS max_price FROM (SELECT MAX(attr_price+0) AS max_attr_price FROM " . $GLOBALS['ecs']->table('goods_attr') .
" WHERE goods_id = '".$goods_id."' GROUP BY attr_id) AS a";
$max_price = $GLOBALS['db']->getOne($sql);
if(intval($max_price) > 0)
{
$goods_max_price = intval($max_price) + intval($row['shop_price']);
$row['shop_price_formated'] = "¥".number_format($row['shop_price'], 2)." – ".number_format($goods_max_price, 2)."元";
}
本文链接:http://78moban.cn/post/6641.html
版权声明:站内所有文章皆来自网络转载,只供模板演示使用,并无任何其它意义!
上一篇:ecshop文章被人家复制自动加上版本声明和网址方法
下一篇:返回列表