주문 취소 요청 기능 제거
This commit is contained in:
@ -16,13 +16,6 @@ if (!$od['od_id'] || (!$is_member && md5($od['od_id'].$od['od_time'].$od['od_ip'
|
||||
alert("조회하실 주문서가 없습니다.", G4_SHOP_URL);
|
||||
}
|
||||
|
||||
// 처리 중인 요청이 있는지..
|
||||
$dsp_request = true;
|
||||
$sql = " select count(*) as cnt from {$g4['shop_request_table']} where od_id = '$od_id' and rq_status = '0' ";
|
||||
$rq = sql_fetch($sql);
|
||||
if($rq['cnt'])
|
||||
$dsp_request = false;
|
||||
|
||||
// 결제방법
|
||||
$settle_case = $od['od_settle_case'];
|
||||
|
||||
@ -35,9 +28,6 @@ include_once(G4_MSHOP_PATH.'/_head.php');
|
||||
<p>주문번호 <strong><?php echo $od_id; ?></strong></p>
|
||||
|
||||
<section id="sod_fin_list">
|
||||
<form name="forderrequest" method="post" action="./orderrequestupdate.php" onsubmit="return frequest_check(this);">
|
||||
<input type="hidden" name="od_id" value="<?php echo $od['od_id']; ?>">
|
||||
<input type="hidden" name="rq_type" value="">
|
||||
<h2>주문하신 상품</h2>
|
||||
<span class="sound_only">상품 상태 설명</span>
|
||||
<dl id="sod_fin_legend">
|
||||
@ -51,9 +41,6 @@ include_once(G4_MSHOP_PATH.'/_head.php');
|
||||
<dd>상품 배송이 완료되었습니다.</dd>
|
||||
</dl>
|
||||
<?php
|
||||
$od_count1 = $od_count2 = 0;
|
||||
$idx = 0;
|
||||
|
||||
$sql = " select it_id, it_name, cp_amount
|
||||
from {$g4['shop_cart_table']}
|
||||
where od_id = '$od_id'
|
||||
@ -74,7 +61,6 @@ include_once(G4_MSHOP_PATH.'/_head.php');
|
||||
<table class="basic_tbl">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">선택</th>
|
||||
<th scope="col">옵션항목</th>
|
||||
<th scope="col">수량</th>
|
||||
<th scope="col">판매가</th>
|
||||
@ -102,19 +88,10 @@ include_once(G4_MSHOP_PATH.'/_head.php');
|
||||
$sell_amount = $opt_price * $opt['ct_qty'];
|
||||
$point = $opt['ct_point'] * $opt['ct_qty'];
|
||||
|
||||
$disabled = '';
|
||||
if($opt['ct_status'] == '취소' || $opt['ct_status'] == '반품' || $opt['ct_status'] == '품절')
|
||||
$disabled = ' disabled="disabled"';
|
||||
|
||||
$ct_list[$opt['ct_id']]['name'] = $opt['it_name'];
|
||||
$ct_list[$opt['ct_id']]['option'] = $opt['ct_option'];
|
||||
?>
|
||||
<tr>
|
||||
<td class="td_chk">
|
||||
<input type="hidden" name="ct_id[<?php echo $idx; ?>]" value="<?php echo $opt['ct_id']; ?>">
|
||||
<label for="chk_ct_id_<?php echo $idx; ?>" class="sound_only"><?php echo $opt['ct_option']; ?></label>
|
||||
<input type="checkbox" name="chk_ct_id[<?php echo $idx; ?>]" value="1" id="chk_ct_id_<?php echo $idx; ?>"<?php echo $disabled; ?>>
|
||||
</td>
|
||||
<td><?php echo $opt['ct_option']; ?></td>
|
||||
<td class="td_smallmng"><?php echo number_format($opt['ct_qty']); ?></td>
|
||||
<td class="td_bignum"><?php echo number_format($opt_price); ?></td>
|
||||
@ -124,13 +101,6 @@ include_once(G4_MSHOP_PATH.'/_head.php');
|
||||
</tr>
|
||||
<?php
|
||||
$tot_point += $point;
|
||||
|
||||
// 전체 상품의 상태가 주문인지 비교할 때 사용
|
||||
$od_count1++;
|
||||
if($opt['ct_status'] == '주문')
|
||||
$od_count2++;
|
||||
|
||||
$idx++;
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
@ -141,136 +111,6 @@ include_once(G4_MSHOP_PATH.'/_head.php');
|
||||
?>
|
||||
</ul>
|
||||
|
||||
<div id="request_form">
|
||||
<div>
|
||||
<label for="rq_content">요청내용</label>
|
||||
<input type="text" name="rq_content" value="" id="rq_content" required class="required frm_input">
|
||||
<input type="submit" value="확인" class="btn_frmline">
|
||||
<button type="button" id="request_close" class="btn_cancel">닫기</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="sod_req_btn">
|
||||
<button type="button" class="req_button btn_frmline">취소요청</button>
|
||||
<button type="button" class="req_button btn_frmline">교환요청</button>
|
||||
<button type="button" class="req_button btn_frmline">반품요청</button>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
// 요청내역
|
||||
$rq_sql = " select * from {$g4['shop_request_table']} where od_id = '$od_id' and rq_parent = '0' order by rq_id ";
|
||||
$rq_res = sql_query($rq_sql);
|
||||
$rq_cnt = mysql_num_rows($rq_res);
|
||||
|
||||
if($rq_cnt)
|
||||
{
|
||||
?>
|
||||
<section id="sod_req_log">
|
||||
<h3>요청내역</h3>
|
||||
<ul>
|
||||
<?php
|
||||
for($j=0; $rq_row=sql_fetch_array($rq_res); $j++) {
|
||||
switch($rq_row['rq_type']) {
|
||||
case 0:
|
||||
$rq_type = '취소';
|
||||
break;
|
||||
case 1:
|
||||
$rq_type = '교환';
|
||||
break;
|
||||
case 2:
|
||||
$rq_type = '반품';
|
||||
break;
|
||||
default:
|
||||
$rq_type = '';
|
||||
break;
|
||||
}
|
||||
|
||||
$item = explode(',', $rq_row['ct_id']);
|
||||
$item_count = count($item);
|
||||
$rq_ct_id = $item[0];
|
||||
$rq_subject = $ct_list[$rq_ct_id]['name'].' '.$ct_list[$rq_ct_id]['option'];
|
||||
if($item_count > 1)
|
||||
$rq_subject .= '외 '.($item_count - 1).'건';
|
||||
$rq_subject .= ' <span>'.$rq_type.'요청</span>';
|
||||
?>
|
||||
<li class="sod_req_log_view">
|
||||
<table class="basic_tbl">
|
||||
<caption><?php echo $rq_subject; ?></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>구분</th>
|
||||
<th>상품명</th>
|
||||
<th>옵션항목</th>
|
||||
<th>요청일</th>
|
||||
<th>처리일</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for($k=0; $k<$item_count; $k++) {
|
||||
$ct_idx = $item[$k];
|
||||
$it_name = $ct_list[$ct_idx]['name'];
|
||||
$ct_option = $ct_list[$ct_idx]['option'];
|
||||
|
||||
$sql = " select rq_time
|
||||
from {$g4['shop_request_table']}
|
||||
where rq_parent = '{$rq_row['rq_id']}' and rq_status <> '0'
|
||||
order by rq_id desc
|
||||
limit 1 ";
|
||||
$tmp = sql_fetch($sql);
|
||||
$done_date = substr($tmp['rq_time'], 2, 8);
|
||||
?>
|
||||
<tr>
|
||||
<td class="td_smallstat"><?php echo $rq_type; ?></td>
|
||||
<td><?php echo $it_name; ?></td>
|
||||
<td><?php echo $ct_option; ?></td>
|
||||
<td class="td_date"><?php echo substr($rq_row['rq_time'], 2, 8); ?></td>
|
||||
<td class="td_date"><?php echo $done_date; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>
|
||||
<?php echo conv_content($rq_row['rq_content'], 0); ?>
|
||||
<?php if($rq_row['rq_status'] == 0) { ?>
|
||||
<button type="button" id="rq_id_<?php echo $rq_row['rq_id']; ?>" class="request_cancel"><?php echo $rq_type; ?>요청취소</button>
|
||||
<?php } ?>
|
||||
</p>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$(".request_cancel").click(function() {
|
||||
if(!confirm("요청을 취소하시겠습니까?"))
|
||||
return false;
|
||||
|
||||
var rq_id = $(this).attr("id").replace("rq_id_", "");
|
||||
$.post(
|
||||
"./orderrequestcancel.php",
|
||||
{ rq_id: rq_id, od_id: "<?php echo $od['od_id']; ?>" },
|
||||
function(data) {
|
||||
if(data != "")
|
||||
alert(data);
|
||||
else {
|
||||
alert("고객님의 요청이 취소되었습니다.");
|
||||
document.location.reload();
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</section>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
// 총계 = 주문상품금액합계 + 배송비 - 상품할인 - 결제할인 - 배송비할인
|
||||
$tot_amount = $od['od_cart_amount'] + $od['od_send_cost'] + $od['od_send_cost2'] - $od['od_cart_coupon'] - $od['od_coupon'] - $od['od_send_coupon'];
|
||||
@ -709,62 +549,6 @@ include_once(G4_MSHOP_PATH.'/_head.php');
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var req_act = "";
|
||||
|
||||
$(function() {
|
||||
$(".req_button").click(function() {
|
||||
var $chk_item = $("input[name^=chk_ct_id]:checked");
|
||||
req_act = $(this).text();
|
||||
<?php if(!$dsp_request) { ?>
|
||||
alert("관리자가 처리 중인 요청내용이 있어 추가로 요청하실 수 없습니다.");
|
||||
return false;
|
||||
<?php } ?>
|
||||
|
||||
if($chk_item.size() < 1) {
|
||||
alert(req_act+"할 상품을 하나 이상 선택해 주십시오");
|
||||
return false;
|
||||
}
|
||||
|
||||
$("input[name=rq_content]").val("");
|
||||
$("#request_form label").text(req_act+"내용");
|
||||
$("#request_form div").css("display", "block");
|
||||
|
||||
});
|
||||
|
||||
$("#request_close").click(function() {
|
||||
$("#request_form div").css("display", "none");
|
||||
});
|
||||
});
|
||||
|
||||
function frequest_check(f)
|
||||
{
|
||||
var rq_type;
|
||||
var $chk_item = $("input[name^=chk_ct_id]:checked");
|
||||
if($chk_item.size() < 1) {
|
||||
alert(req_act+"할 상품을 하나 이상 선택해 주십시오");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!confirm("선택하신 상품을 "+req_act+"하시겠습니까?"))
|
||||
return false;
|
||||
|
||||
switch(req_act) {
|
||||
case "교환요청":
|
||||
rq_type = 1;
|
||||
break;
|
||||
case "반품요청":
|
||||
rq_type = 2;
|
||||
break;
|
||||
default:
|
||||
rq_type = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
f.rq_type.value = rq_type;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function fcancel_check(f)
|
||||
{
|
||||
if(!confirm("주문을 정말 취소하시겠습니까?"))
|
||||
|
||||
Reference in New Issue
Block a user