주문리스트에 주문 상품 레이어 추가
This commit is contained in:
100
adm/shop_admin/ajax.orderitem.php
Normal file
100
adm/shop_admin/ajax.orderitem.php
Normal file
@ -0,0 +1,100 @@
|
||||
<?php
|
||||
$sub_menu = '400400';
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], "r");
|
||||
|
||||
$od_id = $_POST['od_id'];
|
||||
|
||||
$sql = " select * from {$g5['g5_shop_order_table']} where od_id = '$od_id' ";
|
||||
$od = sql_fetch($sql);
|
||||
|
||||
if(!$od['od_id'])
|
||||
die('<div>주문정보가 존재하지 않습니다.</div>');
|
||||
|
||||
// 상품목록
|
||||
$sql = " select it_id,
|
||||
it_name,
|
||||
cp_price,
|
||||
ct_notax
|
||||
from {$g5['g5_shop_cart_table']}
|
||||
where od_id = '$od_id'
|
||||
group by it_id
|
||||
order by ct_id ";
|
||||
$result = sql_query($sql);
|
||||
?>
|
||||
|
||||
<section id="cart_list">
|
||||
<h2 class="h2_frm">주문상품 목록</h2>
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
|
||||
<table>
|
||||
<caption>주문 상품 목록</caption>
|
||||
<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>
|
||||
<th scope="col">쿠폰</th>
|
||||
<th scope="col">포인트</th>
|
||||
<th scope="col">배송비</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
// 상품이미지
|
||||
$image = get_it_image($row['it_id'], 50, 50);
|
||||
|
||||
// 상품의 옵션정보
|
||||
$sql = " select ct_id, it_id, ct_price, ct_qty, ct_option, ct_status, cp_price, ct_send_cost, io_type, io_price
|
||||
from {$g5['g5_shop_cart_table']}
|
||||
where od_id = '$od_id'
|
||||
and it_id = '{$row['it_id']}'
|
||||
order by io_type asc, ct_id asc ";
|
||||
$res = sql_query($sql);
|
||||
$rowspan = mysql_num_rows($res);
|
||||
|
||||
for($k=0; $opt=sql_fetch_array($res); $k++) {
|
||||
if($opt['io_type'])
|
||||
$opt_price = $opt['io_price'];
|
||||
else
|
||||
$opt_price = $opt['ct_price'] + $opt['io_price'];
|
||||
|
||||
// 소계
|
||||
$ct_price['stotal'] = $opt_price * $opt['ct_qty'];
|
||||
$ct_point['stotal'] = $opt['ct_point'] * $opt['ct_qty'];
|
||||
?>
|
||||
<tr>
|
||||
<?php if($k == 0) { ?>
|
||||
<td rowspan="<?php echo $rowspan; ?>">
|
||||
<a href="./itemform.php?w=u&it_id=<?php echo $row['it_id']; ?>"><?php echo $image; ?> <?php echo stripslashes($row['it_name']); ?></a>
|
||||
<?php if($od['od_tax_flag'] && $row['ct_notax']) echo '[비과세상품]'; ?>
|
||||
</td>
|
||||
<?php } ?>
|
||||
<td>
|
||||
<?php echo $opt['ct_option']; ?>
|
||||
</td>
|
||||
<td class="td_mngsmall"><?php echo $opt['ct_status']; ?></td>
|
||||
<td class="td_num"><?php echo $opt['ct_qty']; ?></td>
|
||||
<td class="td_numsmall"><?php echo number_format($opt_price); ?></td>
|
||||
<td class="td_num"><?php echo number_format($ct_price['stotal']); ?></td>
|
||||
<td class="td_num"><?php echo number_format($opt['cp_price']); ?></td>
|
||||
<td class="td_num"><?php echo number_format($ct_point['stotal']); ?></td>
|
||||
<td class="td_sendcost_by"><?php echo $opt['ct_send_cost'] ? '착불' : '선불'; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
@ -292,7 +292,7 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</
|
||||
<a href="<?php echo G5_SHOP_URL; ?>/orderinquiryview.php?od_id=<?php echo $row['od_id']; ?>&uid=<?php echo $uid; ?>"><?php echo $row['od_id']; ?></a><br>
|
||||
</td> -->
|
||||
<td headers="th_ordnum" class="td_odrnum2" rowspan="2" colspan="2">
|
||||
<a href="<?php echo G5_SHOP_URL; ?>/orderinquiryview.php?od_id=<?php echo $row['od_id']; ?>&uid=<?php echo $uid; ?>"><?php echo substr($row['od_id'],0,8).'-'.substr($row['od_id'],8); ?></a>
|
||||
<a href="<?php echo G5_SHOP_URL; ?>/orderinquiryview.php?od_id=<?php echo $row['od_id']; ?>&uid=<?php echo $uid; ?>" class="orderitem"><?php echo substr($row['od_id'],0,8).'-'.substr($row['od_id'],8); ?></a>
|
||||
<?php echo $od_mobile; ?>
|
||||
</td>
|
||||
<td headers="th_odrer" class="td_name"><?php echo $mb_nick; ?></td>
|
||||
@ -427,6 +427,39 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</
|
||||
<script>
|
||||
$(function(){
|
||||
$("#fr_date, #to_date").datepicker({ changeMonth: true, changeYear: true, dateFormat: "yy-mm-dd", showButtonPanel: true, yearRange: "c-99:c+99", maxDate: "+0d" });
|
||||
|
||||
// 주문상품보기
|
||||
$(".orderitem").on("click", function() {
|
||||
var $this = $(this);
|
||||
var od_id = $this.text().replace(/[^0-9]/g, "");
|
||||
|
||||
if($this.next().size())
|
||||
return false;
|
||||
|
||||
$("#orderitemlist").remove();
|
||||
|
||||
$.post(
|
||||
"./ajax.orderitem.php",
|
||||
{ od_id: od_id },
|
||||
function(data) {
|
||||
$this.parent().append("<div id=\"orderitemlist\"><div></div></div>");
|
||||
$("#orderitemlist > div")
|
||||
.html(data)
|
||||
.append("<div><button type=\"button\" id=\"orderitemlist-x\">닫기</button></div>");
|
||||
}
|
||||
);
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
// 상품리스트 닫기
|
||||
$("#orderitemlist-x").on("click", function() {
|
||||
$("#orderitemlist").remove();
|
||||
});
|
||||
|
||||
$("body").on("click", function() {
|
||||
$("#orderitemlist").remove();
|
||||
});
|
||||
});
|
||||
|
||||
function set_date(today)
|
||||
|
||||
@ -441,6 +441,8 @@ td.td_grpset {width:160px;border-left:1px solid #e9ecee;text-align:center}
|
||||
|
||||
/* 주문내역 */
|
||||
#sodr_list td {text-align:center !important}
|
||||
#orderitemlist {position:relative}
|
||||
#orderitemlist > div {position:absolute;top:0;left:0}
|
||||
|
||||
/* 주문내역 수정 */
|
||||
.sodr_nonpay {color:#ff6600}
|
||||
|
||||
Reference in New Issue
Block a user