포인트에 질문

포인트에 질문

QA

포인트에 질문

답변 1

본문

영카트 사용중이고 

예를 들어

45000원을 결제 한다하고 

포인트를 쓴다고 할때

포인트 적립이 안되야되는데 적립되서 문제입니다.

 

포인트를 썻으면 포인트 적립이 안되게끔 하고싶은데 어떻게 해야될까요?

 

 

///shop lib 에서 발견해서 



    $beforedays = date("Y-m-d H:i:s", ( time() - (86400 * (int)$default['de_point_days']) ) ); // 86400초는 하루
    $sql = " select * from {$g5['g5_shop_cart_table']} where ct_status = '$ct_status' and ct_point_use = '0' and ct_time <= '$beforedays' ";
    $result = sql_query($sql);
    for ($i=0; $row=sql_fetch_array($result); $i++) {
        // 회원 ID 를 얻는다.
        $od_row = sql_fetch("select od_id, mb_id from {$g5['g5_shop_order_table']} where od_id = '{$row['od_id']}' ");
        if ($od_row['mb_id'] && $row['ct_point'] > 0 && $row['ct_point_use'] == 0) { // 회원이면서 포인트가 0보다 크다면
            $po_point = $row['ct_point'] * $row['ct_qty'];
            $po_content = "주문번호 {$od_row['od_id']} ({$row['ct_id']}) 주문완료?";
            insert_point($od_row['mb_id'], $po_point, $po_content, "@delivery", $od_row['mb_id'], "{$od_row['od_id']},{$row['ct_id']}");
        }
        sql_query("update {$g5['g5_shop_cart_table']} set ct_point_use = '1' where ct_id = '{$row['ct_id']}' ");
    }
}

if ($od_row['mb_id'] && $row['ct_point'] > 0 

 

=>>

 

 

if ($od_row['mb_id'] && $row['ct_point'] > 0 && $row['ct_point_use'] == 0)

 

 

이렇게 고쳐도 될런지요?

이 질문에 댓글 쓰기 :

답변 1

$sql = " select * from {$g5['g5_shop_cart_table']} where ct_status = '$ct_status' and ct_point_use = '0' and ct_time <= '$beforedays' ";

이미 query 문에 포인트 사용하지 않을때 조건이 있습니다.

 

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 369
© SIRSOFT
현재 페이지 제일 처음으로