【重要】积分赠送BUG,请尽快修复,如果开启积分赠送该BUG会导至积分计算错误
积分赠送BUG,请尽快修复,如果开启积分赠送该BUG会导至积分计算错误
	
找到includes/lib_order.php
	function get_give_integral()
{
        $sql = "SELECT SUM(c.goods_number * IF(g.give_integral > -1, g.give_integral, c.goods_price))" .
                "FROM " . $GLOBALS['ecs']->table('cart') . " AS c, " .
                          $GLOBALS['ecs']->table('goods') . " AS g " .
                "WHERE c.goods_id = g.goods_id " .
                "AND c.session_id = '" . SESS_ID . "' " .
                "AND c.goods_id > 0 " .
                "AND c.parent_id = 0 " .
                "AND c.rec_type = 0 " .
                "AND c.is_gift = 0";
        return intval($GLOBALS['db']->getOne($sql));
}
	
替换为:
	function get_give_integral()
{
        $sql = "SELECT SUM(c.goods_number * IF(g.give_integral > -1, g.give_integral, c.goods_price))" .
                "FROM " . $GLOBALS['ecs']->table('cart') . " AS c, " .
                          $GLOBALS['ecs']->table('goods') . " AS g " .
                "WHERE c.goods_id = g.goods_id " .
                "AND c.session_id = '" . SESS_ID . "' " .
                "AND c.goods_id > 0 " .
                "AND c.parent_id = 0 " .
                "AND c.rec_type = 0 " ." AND rec_id  " .db_create_in($_SESSION['cart_rec_ids']).
                "AND c.is_gift = 0";
        return intval($GLOBALS['db']->getOne($sql));
}
LYECS LYECS电商系统 老杨商城系统 ECSHOP二次开发