전에질문을 드렸었는데요
신청을 하면 관리자 페이지에서 상품이 날아가버리는 증상을 질문드리다
디비를 살펴보니 신청서 작성을 완료하면 ct_status 에 주문 이렇게 입력되야되는거 아닌가요?
여전히 상품이 계속 사라지는 증상이 나타나네요
-------------------------------------------------------------------------------------
기존질문
http://sir.co.kr/bbs/board.php?bo_table=yc4_qa&wr_id=28717&sca=&sfl=mb_id%2C1&stx=superjps
주문자가 주문금액 %내에서 원하는대로 포인트 사용
http://sir.co.kr/bbs/board.php?bo_table=yc4_tiptech&wr_id=807&sca=&sfl=wr_subject%7C%7Cwr_content&stx=%C6%F7%C0%CE%C6%AE&sop=and
위 링크대로 적용을 해서 포인트를 원하는대로 사용할수 있게했는데요
포인트+입금액을 적용하여 결제했을경우 실제 입금액만 포인트를 적용시켜주는
http://opencode.co.kr/bbs/board.php?bo_table=yc4_tips&wr_id=105
링크대로 하니까
신청서에서 상품이 누락되는 경우가 발생하게 되네요
신청서등은 정상작성되고 관리자나 신청한사람한테 메일도 정상적으로 발송 되는데
관리자페이지의 신청서 관리에서 보면 상품이 안보이더라구요
다른거 변경한거는 없는데 한번 봐주시기 바랍니다.
많은 분들이 필요로 하는것일텐데 ...
부탁드릴께요 ^^
신청을 하면 관리자 페이지에서 상품이 날아가버리는 증상을 질문드리다
디비를 살펴보니 신청서 작성을 완료하면 ct_status 에 주문 이렇게 입력되야되는거 아닌가요?
여전히 상품이 계속 사라지는 증상이 나타나네요
-------------------------------------------------------------------------------------
기존질문
http://sir.co.kr/bbs/board.php?bo_table=yc4_qa&wr_id=28717&sca=&sfl=mb_id%2C1&stx=superjps
주문자가 주문금액 %내에서 원하는대로 포인트 사용
http://sir.co.kr/bbs/board.php?bo_table=yc4_tiptech&wr_id=807&sca=&sfl=wr_subject%7C%7Cwr_content&stx=%C6%F7%C0%CE%C6%AE&sop=and
위 링크대로 적용을 해서 포인트를 원하는대로 사용할수 있게했는데요
포인트+입금액을 적용하여 결제했을경우 실제 입금액만 포인트를 적용시켜주는
http://opencode.co.kr/bbs/board.php?bo_table=yc4_tips&wr_id=105
링크대로 하니까
신청서에서 상품이 누락되는 경우가 발생하게 되네요
신청서등은 정상작성되고 관리자나 신청한사람한테 메일도 정상적으로 발송 되는데
관리자페이지의 신청서 관리에서 보면 상품이 안보이더라구요
다른거 변경한거는 없는데 한번 봐주시기 바랍니다.
많은 분들이 필요로 하는것일텐데 ...
부탁드릴께요 ^^
댓글 4개
이제서야 문제를 정확하게 파악 하였습니다.
shop/orderupdate.php 의 원래의 코드
// 장바구니 쇼핑에서 주문으로
// 신용카드로 주문하면서 신용카드 포인트 사용하지 않는다면 포인트 부여하지 않음
$sql_card_point = "";
if ($od_receipt_card > 0 && $default[de_card_point] == false) {
$sql_card_point = " , ct_point = '0' ";
}
$sql = "update $g4[yc4_cart_table]
set ct_status = '주문'
$sql_card_point
where on_uid = '$tmp_on_uid' ";
sql_query($sql);
로 되어 있어 ct_status = '주문' 이라는 값이 조건에 상관없이 변경이 되었습니다.
고객님의 코드는
// 장바구니 쇼핑에서 주문으로
// 신용카드로 주문하면서 신용카드 포인트 사용하지 않는다면 포인트 부여하지 않음
$sql_card_point = "";
if ($od_receipt_card > 0 && $default[de_card_point] == false) {
// 신용카드, 계좌이체 결제시 포인트를 부여할지를 설정합니다. ... $default[de_card_point]
$sql = "update $g4[yc4_cart_table]
set ct_status = '주문',
ct_point = '0'
where on_uid = '$tmp_on_uid' ";
sql_query($sql);
} else { // 포인트적립 허용하는 경우 + 카드결제 이외의 경우
if ($od_receipt_point > 0) {
$sql2 = "select ct_id, ct_point from $g4[yc4_cart_table] where on_uid = '$tmp_on_uid' ";
$result = sql_query($sql2);
for ($i=0; $row=sql_fetch_array($result);$i++) {
$ct_temp_point = $row[ct_point];
// 포인트 끄다리는 무조건 올려준다. 사소한 것으로 기분 나쁘게 하지말자.
$ct_real_point = ceil($ct_temp_point * ($od_receipt_bank + $od_receipt_card) / ($od_receipt_bank + $od_receipt_card + $od_receipt_point));
$sql_point_update = " , ct_point = '$ct_real_point' ";
$sql = "update $g4[yc4_cart_table]
set ct_status = '주문'
$sql_point_update
where on_uid = '$tmp_on_uid' and ct_id = '$row[ct_id]' ";
sql_query($sql);
}
}
}
이렇게 되어 있어 if 문을 통과하지 못하면 ct_stauts 가 '주문'으로 바뀌지 않는 현상이 발생합니다.
포인트로 결제하지 않는 경우는 if 문을 통과하지 않고 있습니다.
이 코드를
// 장바구니 쇼핑에서 주문으로
// 신용카드로 주문하면서 신용카드 포인트 사용하지 않는다면 포인트 부여하지 않음
$sql_card_point = "";
if ($od_receipt_card > 0 && $default[de_card_point] == false) {
$sql_card_point = " , ct_point = '0' ";
}
$sql = "update $g4[yc4_cart_table]
set ct_status = '주문'
$sql_card_point
where on_uid = '$tmp_on_uid' ";
sql_query($sql);
if ($od_receipt_point > 0) {
$sql2 = "select ct_id, ct_point from $g4[yc4_cart_table] where on_uid = '$tmp_on_uid' ";
$result = sql_query($sql2);
for ($i=0; $row=sql_fetch_array($result);$i++) {
$ct_temp_point = $row[ct_point];
// 포인트 끄다리는 무조건 올려준다. 사소한 것으로 기분 나쁘게 하지말자.
$ct_real_point = ceil($ct_temp_point * ($od_receipt_bank + $od_receipt_card) / ($od_receipt_bank + $od_receipt_card + $od_receipt_point));
$sql_point_update = " , ct_point = '$ct_real_point' ";
$sql = "update $g4[yc4_cart_table]
set ct_status = '주문'
$sql_point_update
where on_uid = '$tmp_on_uid' and ct_id = '$row[ct_id]' ";
sql_query($sql);
}
}
이렇게 바꾸시면 원하는 결과를 얻을 수 있을것이라 생각합니다.
수정 후 테스트 해주시기 바랍니다.
shop/orderupdate.php 의 원래의 코드
// 장바구니 쇼핑에서 주문으로
// 신용카드로 주문하면서 신용카드 포인트 사용하지 않는다면 포인트 부여하지 않음
$sql_card_point = "";
if ($od_receipt_card > 0 && $default[de_card_point] == false) {
$sql_card_point = " , ct_point = '0' ";
}
$sql = "update $g4[yc4_cart_table]
set ct_status = '주문'
$sql_card_point
where on_uid = '$tmp_on_uid' ";
sql_query($sql);
로 되어 있어 ct_status = '주문' 이라는 값이 조건에 상관없이 변경이 되었습니다.
고객님의 코드는
// 장바구니 쇼핑에서 주문으로
// 신용카드로 주문하면서 신용카드 포인트 사용하지 않는다면 포인트 부여하지 않음
$sql_card_point = "";
if ($od_receipt_card > 0 && $default[de_card_point] == false) {
// 신용카드, 계좌이체 결제시 포인트를 부여할지를 설정합니다. ... $default[de_card_point]
$sql = "update $g4[yc4_cart_table]
set ct_status = '주문',
ct_point = '0'
where on_uid = '$tmp_on_uid' ";
sql_query($sql);
} else { // 포인트적립 허용하는 경우 + 카드결제 이외의 경우
if ($od_receipt_point > 0) {
$sql2 = "select ct_id, ct_point from $g4[yc4_cart_table] where on_uid = '$tmp_on_uid' ";
$result = sql_query($sql2);
for ($i=0; $row=sql_fetch_array($result);$i++) {
$ct_temp_point = $row[ct_point];
// 포인트 끄다리는 무조건 올려준다. 사소한 것으로 기분 나쁘게 하지말자.
$ct_real_point = ceil($ct_temp_point * ($od_receipt_bank + $od_receipt_card) / ($od_receipt_bank + $od_receipt_card + $od_receipt_point));
$sql_point_update = " , ct_point = '$ct_real_point' ";
$sql = "update $g4[yc4_cart_table]
set ct_status = '주문'
$sql_point_update
where on_uid = '$tmp_on_uid' and ct_id = '$row[ct_id]' ";
sql_query($sql);
}
}
}
이렇게 되어 있어 if 문을 통과하지 못하면 ct_stauts 가 '주문'으로 바뀌지 않는 현상이 발생합니다.
포인트로 결제하지 않는 경우는 if 문을 통과하지 않고 있습니다.
이 코드를
// 장바구니 쇼핑에서 주문으로
// 신용카드로 주문하면서 신용카드 포인트 사용하지 않는다면 포인트 부여하지 않음
$sql_card_point = "";
if ($od_receipt_card > 0 && $default[de_card_point] == false) {
$sql_card_point = " , ct_point = '0' ";
}
$sql = "update $g4[yc4_cart_table]
set ct_status = '주문'
$sql_card_point
where on_uid = '$tmp_on_uid' ";
sql_query($sql);
if ($od_receipt_point > 0) {
$sql2 = "select ct_id, ct_point from $g4[yc4_cart_table] where on_uid = '$tmp_on_uid' ";
$result = sql_query($sql2);
for ($i=0; $row=sql_fetch_array($result);$i++) {
$ct_temp_point = $row[ct_point];
// 포인트 끄다리는 무조건 올려준다. 사소한 것으로 기분 나쁘게 하지말자.
$ct_real_point = ceil($ct_temp_point * ($od_receipt_bank + $od_receipt_card) / ($od_receipt_bank + $od_receipt_card + $od_receipt_point));
$sql_point_update = " , ct_point = '$ct_real_point' ";
$sql = "update $g4[yc4_cart_table]
set ct_status = '주문'
$sql_point_update
where on_uid = '$tmp_on_uid' and ct_id = '$row[ct_id]' ";
sql_query($sql);
}
}
이렇게 바꾸시면 원하는 결과를 얻을 수 있을것이라 생각합니다.
수정 후 테스트 해주시기 바랍니다.
게시글 목록
| 번호 | 제목 |
|---|---|
| 56073 | |
| 56067 | |
| 56065 | |
| 56060 | |
| 56058 | |
| 56055 | |
| 56051 | |
| 56048 | |
| 56044 | |
| 56043 | |
| 56042 | |
| 56039 | |
| 56035 | |
| 56032 | |
| 56030 | |
| 56028 | |
| 56025 | |
| 56018 | |
| 56012 | |
| 56010 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기