shop/orderformupdate.php 를 수정해서 무조건 무통장으로도 강제적으로 포인트 할당이 이루어집니다.
주의하실 점은 실제 결재하지 않아도 포인트가 주어지는 것으로 고육지책으로 내부 사정상 임시로 편성한 거라는 점이며 계좌이체나 신용카드등 다른 결재옵션으로 신청하다 중단해버려도(이 놈들이 없어서 한거라.전 이놈들 계약하면 없애버리면 그만이지만...)차후에 무통장 처리할때 결재 실패한 것까지 겹쳐서 포인트 반영이 되고 실결재도 안했는데 포인트만 한정없이 쌓여버리는 문제가 발생하게 됩니다.
쇼핑몰 용이 아니라 특수목적의 수강신청용 사이트라 그런 문제가 없을 것이라 사료되어서 만든 것이니 유념하십시오.(그래도 가끔 이런게 필요할 때가 있어요.)
기존 orderformupdate.php 214번 소스
if ($od_settle_case == "무통장")
include_once("./ordermail2.inc.php");
include_once("./ordermail2.inc.php");
----------------------------------------- 여기에 소스 코드 삽입
//무통장 강제 포인트 주기-당연히 무통장에만 먹힙니다.
if ($od_settle_case == "무통장"&!isset($order_not_point)) {
$beforedays = date("Y-m-d H:i:s", ( time() - (60 * 60 * 24 * (int)$default[de_point_days]) ) );
$sql = " select * from $g4[yc4_cart_table]
where ct_status = '$cart_title0'
and ct_point_use = '0'
and ct_time <= '$beforedays' ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
// 회원 ID 를 얻는다.
$tmp_row = sql_fetch("select od_id, mb_id from $g4[yc4_order_table] where on_uid = '$row[on_uid]' ");
$beforedays = date("Y-m-d H:i:s", ( time() - (60 * 60 * 24 * (int)$default[de_point_days]) ) );
$sql = " select * from $g4[yc4_cart_table]
where ct_status = '$cart_title0'
and ct_point_use = '0'
and ct_time <= '$beforedays' ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
// 회원 ID 를 얻는다.
$tmp_row = sql_fetch("select od_id, mb_id from $g4[yc4_order_table] where on_uid = '$row[on_uid]' ");
// 회원이면서 포인트가 0보다 크다면
if ($tmp_row[mb_id] && $row[ct_point] > 0)
{
$po_point = $row[ct_point] * $row[ct_qty];
$po_content = "$cart_title3 $tmp_row[od_id] ($row[ct_id]) $cart_title4";
insert_point($tmp_row[mb_id], $po_point, $po_content, "@delivery", $tmp_row[mb_id], "$tmp_row[od_id],$row[on_uid],$row[ct_id]");
}
if ($tmp_row[mb_id] && $row[ct_point] > 0)
{
$po_point = $row[ct_point] * $row[ct_qty];
$po_content = "$cart_title3 $tmp_row[od_id] ($row[ct_id]) $cart_title4";
insert_point($tmp_row[mb_id], $po_point, $po_content, "@delivery", $tmp_row[mb_id], "$tmp_row[od_id],$row[on_uid],$row[ct_id]");
}
sql_query("update $g4[yc4_cart_table] set ct_point_use = '1' where ct_id = '$row[ct_id]' ");
}
}
}
}
게시글 목록
| 번호 | 제목 |
|---|---|
| 1440 | |
| 1434 | |
| 1433 | |
| 1428 | |
| 1421 | |
| 1397 | |
| 1396 | |
| 1388 | |
| 1379 | |
| 1378 | |
| 1377 | |
| 1367 | |
| 1365 | |
| 1362 | |
| 1348 | |
| 1343 | |
| 1335 | |
| 1318 | |
| 1311 | |
| 1310 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기