#252 주문상세 페이지에서도 요청정보 노출되도록 함
This commit is contained in:
@ -80,6 +80,25 @@ if ($od['mb_id'] == "") {
|
|||||||
}
|
}
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// 요청정보
|
||||||
|
$sql = " select * from {$g4['shop_request_table']} where od_id = '{$od['od_id']}' and rq_parent = '0' order by rq_id desc limit 1 ";
|
||||||
|
$rq = sql_fetch($sql);
|
||||||
|
if($rq['rq_id']) {
|
||||||
|
switch($rq['rq_type']) {
|
||||||
|
case 0:
|
||||||
|
$request = '취소';
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
$request = '교환';
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
$request = '반품';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$request = '';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$qstr = "sort1=$sort1&sort2=$sort2&sel_field=$sel_field&search=$search&page=$page";
|
$qstr = "sort1=$sort1&sort2=$sort2&sel_field=$sel_field&search=$search&page=$page";
|
||||||
|
|
||||||
@ -104,8 +123,10 @@ $result = sql_query($sql);
|
|||||||
|
|
||||||
$pg_anchor = '<ul class="anchor">
|
$pg_anchor = '<ul class="anchor">
|
||||||
<li><a href="#anc_sodr_list">주문상품 목록</a></li>
|
<li><a href="#anc_sodr_list">주문상품 목록</a></li>
|
||||||
<li><a href="#anc_sodr_pay">주문결제 내역</a></li>
|
<li><a href="#anc_sodr_pay">주문결제 내역</a></li>';
|
||||||
<li><a href="#anc_sodr_chk">결제상세정보 확인</a></li>
|
if($request)
|
||||||
|
$pg_anchor .= '<li><a href="#anc_sodr_request">주문 '.$request.'요청</a></li>';
|
||||||
|
$pg_anchor .='<li><a href="#anc_sodr_chk">결제상세정보 확인</a></li>
|
||||||
<li><a href="#anc_sodr_paymo">결제상세정보 수정</a></li>
|
<li><a href="#anc_sodr_paymo">결제상세정보 수정</a></li>
|
||||||
<li><a href="#anc_sodr_memo">상점메모</a></li>
|
<li><a href="#anc_sodr_memo">상점메모</a></li>
|
||||||
<li><a href="#anc_sodr_payer">주문하신 분</a></li>
|
<li><a href="#anc_sodr_payer">주문하신 분</a></li>
|
||||||
@ -292,6 +313,23 @@ $pg_anchor = '<ul class="anchor">
|
|||||||
</table>
|
</table>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if($request) {
|
||||||
|
$item = explode(',', $rq['ct_id']);
|
||||||
|
?>
|
||||||
|
<section id="anc_sodr_request" class="cbox">
|
||||||
|
<h2>주문 <?php echo $request; ?>요청</h2>
|
||||||
|
<?php echo $pg_anchor; ?>
|
||||||
|
<div>
|
||||||
|
<?php
|
||||||
|
// 요청 처리폼 include
|
||||||
|
$rq_id = $rq['rq_id'];
|
||||||
|
$disp_list = 0;
|
||||||
|
include_once('./orderrequestview.inc.php');
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<section class="cbox compare_wrap">
|
<section class="cbox compare_wrap">
|
||||||
<h2>결제상세정보</h2>
|
<h2>결제상세정보</h2>
|
||||||
|
|||||||
@ -57,6 +57,13 @@ if($rq['rq_parent']) {
|
|||||||
$cus_content = conv_content($cus['rq_content'], 0);
|
$cus_content = conv_content($cus['rq_content'], 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 요청상품
|
||||||
|
$sql = " select ct_id, it_id, it_name, ct_option, ct_price, ct_qty, io_type, io_price, ct_status
|
||||||
|
from {$g4['shop_cart_table']}
|
||||||
|
where uq_id = '{$od['uq_id']}'
|
||||||
|
order by ct_id ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
|
||||||
$qstr2 = $qstr.'&rq_type='.$rq_type.'&save_stx='.$stx;
|
$qstr2 = $qstr.'&rq_type='.$rq_type.'&save_stx='.$stx;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|||||||
@ -53,7 +53,7 @@ $total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
|||||||
if ($page == '') { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
|
if ($page == '') { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||||
|
|
||||||
$sql = " select a.*, b.od_temp_amount, b.od_name
|
$sql = " select a.*, b.uq_id, b.od_temp_amount, b.od_name
|
||||||
$sql_common
|
$sql_common
|
||||||
order by $sst $sod, a.rq_id desc
|
order by $sst $sod, a.rq_id desc
|
||||||
limit $from_record, $rows ";
|
limit $from_record, $rows ";
|
||||||
|
|||||||
80
adm/shop_admin/orderrequestview.inc.php
Normal file
80
adm/shop_admin/orderrequestview.inc.php
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
<?php
|
||||||
|
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||||
|
|
||||||
|
if(empty($rq)) {
|
||||||
|
$sql = " select * from {$g4['shop_request_table']} where rq_id = '$rq_id' ";
|
||||||
|
$rq = sql_fetch($sql);
|
||||||
|
}
|
||||||
|
if(!$rq['rq_id'])
|
||||||
|
alert('요청 자료가 없습니다.');
|
||||||
|
|
||||||
|
$item = explode(',', $rq['ct_id']);
|
||||||
|
if(!count($item))
|
||||||
|
alert($type.'요청된 상품이 없습니다.');
|
||||||
|
|
||||||
|
if(empty($od)) {
|
||||||
|
$sql = " select * from {$g4['shop_order_table']} where od_id = '{$rq['od_id']}' ";
|
||||||
|
$od = sql_fetch($sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = " select ct_id, it_id, it_name, ct_option, ct_price, ct_qty, io_type, io_price, ct_status
|
||||||
|
from {$g4['shop_cart_table']}
|
||||||
|
where uq_id = '{$od['uq_id']}'
|
||||||
|
order by ct_id ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<h2><?php echo $type; ?>요청 상품</h2>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">상품명</th>
|
||||||
|
<th scope="col">옵션항목</th>
|
||||||
|
<th scope="col">판매가</th>
|
||||||
|
<th scope="col">수량</th>
|
||||||
|
<th scope="col">소계</th>
|
||||||
|
<th scope="col">상태</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$excp = 0;
|
||||||
|
for($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
|
if(!in_array($row['ct_id'], $item)) {
|
||||||
|
$excp++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$image = get_it_image($row['it_id'], 50, 50);
|
||||||
|
|
||||||
|
if($row['io_type']) {
|
||||||
|
$price = $row['io_price'];
|
||||||
|
$tot_price = $row['io_price'] * $row['ct_qty'];
|
||||||
|
} else {
|
||||||
|
$price = $row['ct_price'] + $row['io_price'];
|
||||||
|
$tot_price = ($row['ct_price'] + $row['io_price']) * $row['ct_qty'];
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td><a href="./itemform.php?w=u&it_id=<?php echo $row['it_id']; ?>"><?php echo $image; ?> <?php echo stripslashes($row['it_name']); ?></a></td>
|
||||||
|
<td><?php echo $row['ct_option']; ?></td>
|
||||||
|
<td><?php echo number_format($price); ?></td>
|
||||||
|
<td><?php echo number_format($row['ct_qty']); ?></td>
|
||||||
|
<td><?php echo number_format($tot_price); ?></td>
|
||||||
|
<td><?php echo $row['ct_status']; ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<div id="order_request">
|
||||||
|
<?php
|
||||||
|
// 요청 처리폼 include
|
||||||
|
$disp_list = 1;
|
||||||
|
include_once('./orderrequestform.php');
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
@ -24,78 +24,11 @@ switch($rq['rq_type']) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$item = explode(',', $rq['ct_id']);
|
|
||||||
if(!count($item))
|
|
||||||
alert($type.'요청된 상품이 없습니다.');
|
|
||||||
|
|
||||||
$g4['title'] = $type.'요청 상세내용';
|
$g4['title'] = $type.'요청 상세내용';
|
||||||
include_once (G4_ADMIN_PATH.'/admin.head.php');
|
include_once (G4_ADMIN_PATH.'/admin.head.php');
|
||||||
|
|
||||||
// 요청상품
|
|
||||||
$sql = " select * from {$g4['shop_order_table']} where od_id = '{$rq['od_id']}' ";
|
|
||||||
$od = sql_fetch($sql);
|
|
||||||
|
|
||||||
$sql = " select ct_id, it_id, it_name, ct_option, ct_price, ct_qty, io_type, io_price, ct_status
|
|
||||||
from {$g4['shop_cart_table']}
|
|
||||||
where uq_id = '{$od['uq_id']}'
|
|
||||||
order by ct_id ";
|
|
||||||
$result = sql_query($sql);
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<section>
|
<?php include_once('./orderrequestview.inc.php'); ?>
|
||||||
<h2><?php echo $type; ?>요청 상품</h2>
|
|
||||||
<table>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">상품명</th>
|
|
||||||
<th scope="col">옵션항목</th>
|
|
||||||
<th scope="col">판매가</th>
|
|
||||||
<th scope="col">수량</th>
|
|
||||||
<th scope="col">소계</th>
|
|
||||||
<th scope="col">상태</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<?php
|
|
||||||
$excp = 0;
|
|
||||||
for($i=0; $row=sql_fetch_array($result); $i++) {
|
|
||||||
if(!in_array($row['ct_id'], $item)) {
|
|
||||||
$excp++;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$image = get_it_image($row['it_id'], 50, 50);
|
|
||||||
|
|
||||||
if($row['io_type']) {
|
|
||||||
$price = $row['io_price'];
|
|
||||||
$tot_price = $row['io_price'] * $row['ct_qty'];
|
|
||||||
} else {
|
|
||||||
$price = $row['ct_price'] + $row['io_price'];
|
|
||||||
$tot_price = ($row['ct_price'] + $row['io_price']) * $row['ct_qty'];
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<tr>
|
|
||||||
<td><a href="./itemform.php?w=u&it_id=<?php echo $row['it_id']; ?>"><?php echo $image; ?> <?php echo stripslashes($row['it_name']); ?></a></td>
|
|
||||||
<td><?php echo $row['ct_option']; ?></td>
|
|
||||||
<td><?php echo number_format($price); ?></td>
|
|
||||||
<td><?php echo number_format($row['ct_qty']); ?></td>
|
|
||||||
<td><?php echo number_format($tot_price); ?></td>
|
|
||||||
<td><?php echo $row['ct_status']; ?></td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<div id="order_request">
|
|
||||||
<?php
|
|
||||||
// 요청 처리폼 include
|
|
||||||
$disp_list = 1;
|
|
||||||
include_once('./orderrequestform.php');
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
include_once (G4_ADMIN_PATH.'/admin.tail.php');
|
include_once (G4_ADMIN_PATH.'/admin.tail.php');
|
||||||
|
|||||||
Reference in New Issue
Block a user