Ecshop PHP查询新加的“buymax”字段的值,怎样才能在前台页面调用出来,比如{$goods.bumax}
2015-07-13
展开全部
打开程序根目录 includes\lib_goods.php 大概499行的位置
function get_goods_info($goods_id)
$sql = 'SELECT g.*, c.measure_unit, b.brand_id, b.brand_name AS goods_brand, m.type_money AS bonus_money,g.buymax ' .
'IFNULL(AVG(r.comment_rank), 0) AS comment_rank, ' .
"IFNULL(mp.user_price, g.shop_price * '$_SESSION[discount]') AS rank_price " .
'FROM ' . $GLOBALS['ecs']->table('goods') . ' AS g ' .
'LEFT JOIN ' . $GLOBALS['ecs']->table('category') . ' AS c ON g.cat_id = c.cat_id ' .
'LEFT JOIN ' . $GLOBALS['ecs']->table('brand') . ' AS b ON g.brand_id = b.brand_id ' .
'LEFT JOIN ' . $GLOBALS['ecs']->table('comment') . ' AS r '.
'ON r.id_value = g.goods_id AND comment_type = 0 AND r.parent_id = 0 AND r.status = 1 ' .
'LEFT JOIN ' . $GLOBALS['ecs']->table('bonus_type') . ' AS m ' .
"ON g.bonus_type_id = m.type_id AND m.send_start_date <= '$time' AND m.send_end_date >= '$time'" .
" LEFT JOIN " . $GLOBALS['ecs']->table('member_price') . " AS mp ".
"ON mp.goods_id = g.goods_id AND mp.user_rank = '$_SESSION[user_rank]' ".
"WHERE g.goods_id = '$goods_id' AND g.is_delete = 0 " .
"GROUP BY g.goods_id";
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询