匿名用户
1级
2015-04-13 回答
方法/步骤
在系统目录文件找到includes/lib_goods.php 这个文件打开在此页最底部加入以下函数代码:
/**
* 首页获取指定分类产品
*
* @access public
* @param string $cat_id53_best_goods
* @param array $cat_id53_best_goods
* @return array
*/
function get_cat_id_goods_list($cat_id = '', $num = '') {
$sql = 'Select g.goods_id, g.cat_id,c.parent_id, g.goods_name, g.goods_name_style, g.market_price, g.shop_price AS org_price, g.promote_price, ' .
"IFNULL(mp.user_price, g.shop_price * '$_SESSION[discount]') AS shop_price, " .
"promote_start_date, promote_end_date, g.goods_brief, g.goods_thumb, goods_img, " .
"g.is_best, g.is_new, g.is_hot, g.is_promote " .
'FROM ' . $GLOBALS ['ecs']->table ( 'goods' ) . &