판매 완료시 포인트 적립에 대해서 묻고 싶습니다.
본문
lib\shop.lib.php 포인트 적립 부분인데요
function save_order_point($ct_status="완료")
{
global $g5, $default;
$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) { // 회원이면서 포인트가 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']}' ");
}
}
여기에서 혹시 판매완료가 되었을때 혹시
$list[$i]['it_maker'] 에 적혀있는 회원아이디로 포인트를 쏘아주고 싶은데
가능할까요?
어디를 어떻게 수정해야 하는지 잘 모르겠네요 ㅠㅠ
도움 부탁드립니다.
!-->
답변을 작성하시기 전에 로그인 해주세요.