Merge branch 'master' of github.com:gnuboard/yc5
This commit is contained in:
202
shop/cart.php
202
shop/cart.php
@ -26,111 +26,113 @@ include_once('./_head.php');
|
||||
<div id="sod_bsk">
|
||||
|
||||
<form name="frmcartlist" id="sod_bsk_list" method="post" action="<?php echo $cart_action_url; ?>">
|
||||
<table class="basic_tbl">
|
||||
<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">
|
||||
<label for="ct_all" class="sound_only">상품 전체</label>
|
||||
<input type="checkbox" name="ct_all" value="1" id="ct_all" checked="checked">
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$tot_point = 0;
|
||||
$tot_sell_price = 0;
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<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>
|
||||
<th scope="col">
|
||||
<label for="ct_all" class="sound_only">상품 전체</label>
|
||||
<input type="checkbox" name="ct_all" value="1" id="ct_all" checked="checked">
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$tot_point = 0;
|
||||
$tot_sell_price = 0;
|
||||
|
||||
// $s_cart_id 로 현재 장바구니 자료 쿼리
|
||||
$sql = " select a.ct_id,
|
||||
a.it_id,
|
||||
a.it_name,
|
||||
a.ct_price,
|
||||
a.ct_point,
|
||||
a.ct_qty,
|
||||
a.ct_status,
|
||||
a.ct_send_cost,
|
||||
b.ca_id,
|
||||
b.ca_id2,
|
||||
b.ca_id3
|
||||
from {$g5['g5_shop_cart_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id )
|
||||
where a.od_id = '$s_cart_id' ";
|
||||
if($default['de_cart_keep_term']) {
|
||||
$ctime = date('Y-m-d H:i:s', G5_SERVER_TIME - ($default['de_cart_keep_term'] * 86400));
|
||||
$sql .= " and a.ct_time > '$ctime' ";
|
||||
}
|
||||
$sql .= " group by a.it_id ";
|
||||
$sql .= " order by a.ct_id ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$it_send_cost = 0;
|
||||
|
||||
for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
{
|
||||
// 합계금액 계산
|
||||
$sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price,
|
||||
SUM(ct_point * ct_qty) as point,
|
||||
SUM(ct_qty) as qty
|
||||
from {$g5['g5_shop_cart_table']}
|
||||
where it_id = '{$row['it_id']}'
|
||||
and od_id = '$s_cart_id' ";
|
||||
$sum = sql_fetch($sql);
|
||||
|
||||
if ($i==0) { // 계속쇼핑
|
||||
$continue_ca_id = $row['ca_id'];
|
||||
// $s_cart_id 로 현재 장바구니 자료 쿼리
|
||||
$sql = " select a.ct_id,
|
||||
a.it_id,
|
||||
a.it_name,
|
||||
a.ct_price,
|
||||
a.ct_point,
|
||||
a.ct_qty,
|
||||
a.ct_status,
|
||||
a.ct_send_cost,
|
||||
b.ca_id,
|
||||
b.ca_id2,
|
||||
b.ca_id3
|
||||
from {$g5['g5_shop_cart_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id )
|
||||
where a.od_id = '$s_cart_id' ";
|
||||
if($default['de_cart_keep_term']) {
|
||||
$ctime = date('Y-m-d H:i:s', G5_SERVER_TIME - ($default['de_cart_keep_term'] * 86400));
|
||||
$sql .= " and a.ct_time > '$ctime' ";
|
||||
}
|
||||
$sql .= " group by a.it_id ";
|
||||
$sql .= " order by a.ct_id ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$a1 = '<a href="./item.php?it_id='.$row['it_id'].'"><b>';
|
||||
$a2 = '</b></a>';
|
||||
$image = get_it_image($row['it_id'], 70, 70);
|
||||
$it_send_cost = 0;
|
||||
|
||||
$it_name = $a1 . stripslashes($row['it_name']) . $a2;
|
||||
$it_options = print_item_options($row['it_id'], $s_cart_id);
|
||||
if($it_options) {
|
||||
$mod_options = '<div class="sod_option_btn"><button type="button" class="mod_options">선택사항수정</button></div>';
|
||||
$it_name .= '<div class="sod_bsk_itopt">'.$it_options.'</div>';
|
||||
for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
{
|
||||
// 합계금액 계산
|
||||
$sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price,
|
||||
SUM(ct_point * ct_qty) as point,
|
||||
SUM(ct_qty) as qty
|
||||
from {$g5['g5_shop_cart_table']}
|
||||
where it_id = '{$row['it_id']}'
|
||||
and od_id = '$s_cart_id' ";
|
||||
$sum = sql_fetch($sql);
|
||||
|
||||
if ($i==0) { // 계속쇼핑
|
||||
$continue_ca_id = $row['ca_id'];
|
||||
}
|
||||
|
||||
$a1 = '<a href="./item.php?it_id='.$row['it_id'].'"><b>';
|
||||
$a2 = '</b></a>';
|
||||
$image = get_it_image($row['it_id'], 70, 70);
|
||||
|
||||
$it_name = $a1 . stripslashes($row['it_name']) . $a2;
|
||||
$it_options = print_item_options($row['it_id'], $s_cart_id);
|
||||
if($it_options) {
|
||||
$mod_options = '<div class="sod_option_btn"><button type="button" class="mod_options">선택사항수정</button></div>';
|
||||
$it_name .= '<div class="sod_bsk_itopt">'.$it_options.'</div>';
|
||||
}
|
||||
|
||||
$point = $sum['point'];
|
||||
$sell_price = $sum['price'];
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td class="sod_bsk_img"><?php echo $image; ?></td>
|
||||
<td>
|
||||
<input type="hidden" name="it_id[<?php echo $i; ?>]" value="<?php echo $row['it_id']; ?>">
|
||||
<input type="hidden" name="it_name[<?php echo $i; ?>]" value="<?php echo get_text($row['it_name']); ?>">
|
||||
<?php echo $it_name.$mod_options; ?>
|
||||
</td>
|
||||
<td class="td_num"><?php echo number_format($sum['qty']); ?></td>
|
||||
<td class="td_numbig"><?php echo number_format($row['ct_price']); ?></td>
|
||||
<td class="td_numbig"><span id="sell_price_<?php echo $i; ?>"><?php echo number_format($sell_price); ?></span></td>
|
||||
<td class="td_numbig"><?php echo number_format($point); ?></td>
|
||||
<td class="td_chk">
|
||||
<label for="ct_chk_<?php echo $i; ?>" class="sound_only">상품</label>
|
||||
<input type="checkbox" name="ct_chk[<?php echo $i; ?>]" value="1" id="ct_chk_<?php echo $i; ?>" checked="checked">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
$tot_point += $point;
|
||||
$tot_sell_price += $sell_price;
|
||||
} // for 끝
|
||||
|
||||
if ($i == 0) {
|
||||
echo '<tr><td colspan="7" class="empty_table">장바구니에 담긴 상품이 없습니다.</td></tr>';
|
||||
} else {
|
||||
// 배송비 계산
|
||||
$send_cost = get_sendcost($s_cart_id, 0);
|
||||
}
|
||||
|
||||
$point = $sum['point'];
|
||||
$sell_price = $sum['price'];
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td class="sod_bsk_img"><?php echo $image; ?></td>
|
||||
<td>
|
||||
<input type="hidden" name="it_id[<?php echo $i; ?>]" value="<?php echo $row['it_id']; ?>">
|
||||
<input type="hidden" name="it_name[<?php echo $i; ?>]" value="<?php echo get_text($row['it_name']); ?>">
|
||||
<?php echo $it_name.$mod_options; ?>
|
||||
</td>
|
||||
<td class="td_num"><?php echo number_format($sum['qty']); ?></td>
|
||||
<td class="td_bignum"><?php echo number_format($row['ct_price']); ?></td>
|
||||
<td class="td_bignum"><span id="sell_price_<?php echo $i; ?>"><?php echo number_format($sell_price); ?></span></td>
|
||||
<td class="td_bignum"><?php echo number_format($point); ?></td>
|
||||
<td class="td_chk">
|
||||
<label for="ct_chk_<?php echo $i; ?>" class="sound_only">상품</label>
|
||||
<input type="checkbox" name="ct_chk[<?php echo $i; ?>]" value="1" id="ct_chk_<?php echo $i; ?>" checked="checked">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
$tot_point += $point;
|
||||
$tot_sell_price += $sell_price;
|
||||
} // for 끝
|
||||
|
||||
if ($i == 0) {
|
||||
echo '<tr><td colspan="7" class="empty_table">장바구니에 담긴 상품이 없습니다.</td></tr>';
|
||||
} else {
|
||||
// 배송비 계산
|
||||
$send_cost = get_sendcost($s_cart_id, 0);
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$tot_price = $tot_sell_price + $send_cost; // 총계 = 주문상품금액합계 + 배송비
|
||||
|
||||
@ -20,57 +20,59 @@ $result = sql_query($sql);
|
||||
<div id="coupon" class="new_win">
|
||||
<h1 id="new_win_title"><?php echo $g5['title'] ?></h1>
|
||||
|
||||
<table class="basic_tbl">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">쿠폰명</th>
|
||||
<th scope="col">적용대상</th>
|
||||
<th scope="col">할인금액</th>
|
||||
<th scope="col">사용기한</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$cp_count = 0;
|
||||
for($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
if(is_used_coupon($member['mb_id'], $row['cp_id']))
|
||||
continue;
|
||||
<div class="tbl_wrap tbl_head01">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">쿠폰명</th>
|
||||
<th scope="col">적용대상</th>
|
||||
<th scope="col">할인금액</th>
|
||||
<th scope="col">사용기한</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$cp_count = 0;
|
||||
for($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
if(is_used_coupon($member['mb_id'], $row['cp_id']))
|
||||
continue;
|
||||
|
||||
if($row['cp_method'] == 1) {
|
||||
$sql = " select ca_name from {$g5['g5_shop_category_table']} where ca_id = '{$row['cp_target']}' ";
|
||||
$ca = sql_fetch($sql);
|
||||
$cp_target = $ca['ca_name'].'의 상품할인';
|
||||
} else if($row['cp_method'] == 2) {
|
||||
$cp_target = '결제금액 할인';
|
||||
} else if($row['cp_method'] == 3) {
|
||||
$cp_target = '배송비 할인';
|
||||
} else {
|
||||
$sql = " select it_name from {$g5['g5_shop_item_table']} where it_id = '{$row['cp_target']}' ";
|
||||
$it = sql_fetch($sql);
|
||||
$cp_target = $it['it_name'].' 상품할인';
|
||||
if($row['cp_method'] == 1) {
|
||||
$sql = " select ca_name from {$g5['g5_shop_category_table']} where ca_id = '{$row['cp_target']}' ";
|
||||
$ca = sql_fetch($sql);
|
||||
$cp_target = $ca['ca_name'].'의 상품할인';
|
||||
} else if($row['cp_method'] == 2) {
|
||||
$cp_target = '결제금액 할인';
|
||||
} else if($row['cp_method'] == 3) {
|
||||
$cp_target = '배송비 할인';
|
||||
} else {
|
||||
$sql = " select it_name from {$g5['g5_shop_item_table']} where it_id = '{$row['cp_target']}' ";
|
||||
$it = sql_fetch($sql);
|
||||
$cp_target = $it['it_name'].' 상품할인';
|
||||
}
|
||||
|
||||
if($row['cp_type'])
|
||||
$cp_price = $row['cp_price'].'%';
|
||||
else
|
||||
$cp_price = number_format($row['cp_price']).'원';
|
||||
|
||||
$cp_count++;
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $row['cp_subject']; ?></td>
|
||||
<td><?php echo $cp_target; ?></td>
|
||||
<td class="td_numbig"><?php echo $cp_price; ?></td>
|
||||
<td class="td_datetime"><?php echo substr($row['cp_start'], 2, 8); ?> ~ <?php echo substr($row['cp_end'], 2, 8); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
if($row['cp_type'])
|
||||
$cp_price = $row['cp_price'].'%';
|
||||
else
|
||||
$cp_price = number_format($row['cp_price']).'원';
|
||||
|
||||
$cp_count++;
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $row['cp_subject']; ?></td>
|
||||
<td><?php echo $cp_target; ?></td>
|
||||
<td class="td_bignum"><?php echo $cp_price; ?></td>
|
||||
<td class="td_datetime"><?php echo substr($row['cp_start'], 2, 8); ?> ~ <?php echo substr($row['cp_end'], 2, 8); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
if(!$cp_count)
|
||||
echo '<tr><td colspan="4" class="empty_table">사용할 수 있는 쿠폰이 없습니다.</td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
if(!$cp_count)
|
||||
echo '<tr><td colspan="4" class="empty_table">사용할 수 있는 쿠폰이 없습니다.</td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_win"><a href="javascript:;" onclick="window.close();">창닫기</a></div>
|
||||
</div>
|
||||
|
||||
@ -21,11 +21,12 @@ include_once(G5_PATH.'/head.sub.php');
|
||||
<div id="sit_rec_new" class="new_win">
|
||||
<h1><?php echo $g5['title']; ?></h1>
|
||||
|
||||
<div class="cbox">
|
||||
<form name="fitemrecommend" method="post" action="./itemrecommendmail.php" autocomplete="off" onsubmit="return fitemrecommend_check(this);">
|
||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||
<input type="hidden" name="it_id" value="<?php echo $it_id; ?>">
|
||||
<table class="frm_tbl">
|
||||
<form name="fitemrecommend" method="post" action="./itemrecommendmail.php" autocomplete="off" onsubmit="return fitemrecommend_check(this);">
|
||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||
<input type="hidden" name="it_id" value="<?php echo $it_id; ?>">
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col>
|
||||
@ -45,14 +46,14 @@ include_once(G5_PATH.'/head.sub.php');
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="btn_win">
|
||||
<input type="submit" id="btn_submit" value="보내기" class="btn_submit">
|
||||
<a href="javascript:window.close();">창닫기</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn_win">
|
||||
<input type="submit" id="btn_submit" value="보내기" class="btn_submit">
|
||||
<a href="javascript:window.close();">창닫기</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
@ -83,43 +83,45 @@ for($k=0; $cp=sql_fetch_array($res); $k++) {
|
||||
<section id="smb_my_wish">
|
||||
<h2>최근 위시리스트</h2>
|
||||
|
||||
<table class="basic_tbl">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">이미지</th>
|
||||
<th scope="col">상품명</th>
|
||||
<th scope="col">보관일시</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$sql = " select *
|
||||
from {$g5['g5_shop_wish_table']} a,
|
||||
{$g5['g5_shop_item_table']} b
|
||||
where a.mb_id = '{$member['mb_id']}'
|
||||
and a.it_id = b.it_id
|
||||
order by a.wi_id desc
|
||||
limit 0, 3 ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row = sql_fetch_array($result); $i++)
|
||||
{
|
||||
$image = get_it_image($row['it_id'], 70, 70, true);
|
||||
?>
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">이미지</th>
|
||||
<th scope="col">상품명</th>
|
||||
<th scope="col">보관일시</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$sql = " select *
|
||||
from {$g5['g5_shop_wish_table']} a,
|
||||
{$g5['g5_shop_item_table']} b
|
||||
where a.mb_id = '{$member['mb_id']}'
|
||||
and a.it_id = b.it_id
|
||||
order by a.wi_id desc
|
||||
limit 0, 3 ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row = sql_fetch_array($result); $i++)
|
||||
{
|
||||
$image = get_it_image($row['it_id'], 70, 70, true);
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td class="smb_my_img"><?php echo $image; ?></td>
|
||||
<td><a href="./item.php?it_id=<?php echo $row['it_id']; ?>"><?php echo stripslashes($row['it_name']); ?></a></td>
|
||||
<td class="td_datetime"><?php echo $row['wi_time']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="smb_my_img"><?php echo $image; ?></td>
|
||||
<td><a href="./item.php?it_id=<?php echo $row['it_id']; ?>"><?php echo stripslashes($row['it_name']); ?></a></td>
|
||||
<td class="td_datetime"><?php echo $row['wi_time']; ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($i == 0)
|
||||
echo '<tr><td colspan="3" class="empty_table">보관 내역이 없습니다.</td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
if ($i == 0)
|
||||
echo '<tr><td colspan="3" class="empty_table">보관 내역이 없습니다.</td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="smb_my_more">
|
||||
<a href="./wishlist.php" class="btn01">위시리스트 더보기</a>
|
||||
|
||||
@ -50,47 +50,50 @@ $order_action_url = G5_HTTPS_SHOP_URL.'/orderaddressupdate.php';
|
||||
|
||||
<h1 id="new_win_title">배송지 목록</h1>
|
||||
|
||||
<table class="basic_tbl">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">
|
||||
<label for="chk_all" class="sound_only">전체선택</label><input type="checkbox" name="chk_all" id="chk_all">
|
||||
</th>
|
||||
<th scope="col">배송지명</th>
|
||||
<th scope="col">기본<br>배송지</th>
|
||||
<th scope="col">이름</th>
|
||||
<th scope="col">전화번호</th>
|
||||
<th scope="col">주소</th>
|
||||
<th scope="col">관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$sep = chr(30);
|
||||
for($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$addr = $row['ad_name'].$sep.$row['ad_tel'].$sep.$row['ad_hp'].$sep.$row['ad_zip1'].$sep.$row['ad_zip2'].$sep.$row['ad_addr1'].$sep.$row['ad_addr2'].$sep.$row['ad_subject'];
|
||||
?>
|
||||
<tr>
|
||||
<td class="td_chk"><label for="chk_<?php echo $i;?>" class="sound_only">배송지선택</label>
|
||||
<input type="hidden" name="ad_id[<?php echo $i; ?>]" value="<?php echo $row['ad_id'];?>">
|
||||
<input type="checkbox" name="chk[]" value="<?php echo $i;?>" id="chk_<?php echo $i;?>">
|
||||
</td>
|
||||
<td class="td_name"><input type="text" name="ad_subject[<?php echo $i; ?>]" id="ad_subject" class="frm_input" size="12" maxlength="20" value="<?php echo $row['ad_subject']; ?>"></td>
|
||||
<td class="td_default"><label for="ad_default<?php echo $i;?>" class="sound_only">기본배송지</label><input type="radio" name="ad_default" value="<?php echo $row['ad_id'];?>" id="ad_default<?php echo $i;?>" <?php if($row['ad_default']) echo 'checked="checked"';?>></td>
|
||||
<td class="td_smallname"><?php echo $row['ad_name']; ?></td>
|
||||
<td class="td_bignum"><?php echo $row['ad_tel']; ?><br><?php echo $row['ad_hp']; ?></td>
|
||||
<td><?php echo sprintf('%s %s', $row['ad_addr1'], $row['ad_addr2']); ?></td>
|
||||
<td class="td_mng">
|
||||
<input type="hidden" value="<?php echo $addr; ?>">
|
||||
<button type="button" class="sel_address btn_frmline">선택</button>
|
||||
<a href="<?php echo $_SERVER['PHP_SELF']; ?>?w=d&ad_id=<?php echo $row['ad_id']; ?>" class="del_address">삭제</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">
|
||||
<label for="chk_all" class="sound_only">전체선택</label><input type="checkbox" name="chk_all" id="chk_all">
|
||||
</th>
|
||||
<th scope="col">배송지명</th>
|
||||
<th scope="col">기본<br>배송지</th>
|
||||
<th scope="col">이름</th>
|
||||
<th scope="col">전화번호</th>
|
||||
<th scope="col">주소</th>
|
||||
<th scope="col">관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$sep = chr(30);
|
||||
for($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$addr = $row['ad_name'].$sep.$row['ad_tel'].$sep.$row['ad_hp'].$sep.$row['ad_zip1'].$sep.$row['ad_zip2'].$sep.$row['ad_addr1'].$sep.$row['ad_addr2'].$sep.$row['ad_subject'];
|
||||
?>
|
||||
<tr>
|
||||
<td class="td_chk"><label for="chk_<?php echo $i;?>" class="sound_only">배송지선택</label>
|
||||
<input type="hidden" name="ad_id[<?php echo $i; ?>]" value="<?php echo $row['ad_id'];?>">
|
||||
<input type="checkbox" name="chk[]" value="<?php echo $i;?>" id="chk_<?php echo $i;?>">
|
||||
</td>
|
||||
<td class="td_name"><input type="text" name="ad_subject[<?php echo $i; ?>]" id="ad_subject" class="frm_input" size="12" maxlength="20" value="<?php echo $row['ad_subject']; ?>"></td>
|
||||
<td class="td_default"><label for="ad_default<?php echo $i;?>" class="sound_only">기본배송지</label><input type="radio" name="ad_default" value="<?php echo $row['ad_id'];?>" id="ad_default<?php echo $i;?>" <?php if($row['ad_default']) echo 'checked="checked"';?>></td>
|
||||
<td class="td_namesmall"><?php echo $row['ad_name']; ?></td>
|
||||
<td class="td_numbig"><?php echo $row['ad_tel']; ?><br><?php echo $row['ad_hp']; ?></td>
|
||||
<td><?php echo sprintf('%s %s', $row['ad_addr1'], $row['ad_addr2']); ?></td>
|
||||
<td class="td_mng">
|
||||
<input type="hidden" value="<?php echo $addr; ?>">
|
||||
<button type="button" class="sel_address btn_frmline">선택</button>
|
||||
<a href="<?php echo $_SERVER['PHP_SELF']; ?>?w=d&ad_id=<?php echo $row['ad_id']; ?>" class="del_address">삭제</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_list">
|
||||
<input type="submit" name="act_button" value="선택수정" id="btn_submit">
|
||||
</div>
|
||||
|
||||
@ -21,47 +21,49 @@ $count = mysql_num_rows($result);
|
||||
<!-- 쿠폰 선택 시작 { -->
|
||||
<div id="od_coupon_frm">
|
||||
<?php if($count > 0) { ?>
|
||||
<table class="basic_tbl">
|
||||
<caption>쿠폰 선택</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<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++) {
|
||||
// 사용한 쿠폰인지 체크
|
||||
if(is_used_coupon($member['mb_id'], $row['cp_id']))
|
||||
continue;
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption>쿠폰 선택</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<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++) {
|
||||
// 사용한 쿠폰인지 체크
|
||||
if(is_used_coupon($member['mb_id'], $row['cp_id']))
|
||||
continue;
|
||||
|
||||
$dc = 0;
|
||||
if($row['cp_type']) {
|
||||
$dc = floor(($price * ($row['cp_price'] / 100)) / $row['cp_trunc']) * $row['cp_trunc'];
|
||||
} else {
|
||||
$dc = $row['cp_price'];
|
||||
$dc = 0;
|
||||
if($row['cp_type']) {
|
||||
$dc = floor(($price * ($row['cp_price'] / 100)) / $row['cp_trunc']) * $row['cp_trunc'];
|
||||
} else {
|
||||
$dc = $row['cp_price'];
|
||||
}
|
||||
|
||||
if($row['cp_maximum'] && $dc > $row['cp_maximum'])
|
||||
$dc = $row['cp_maximum'];
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="hidden" name="o_cp_id[]" value="<?php echo $row['cp_id']; ?>">
|
||||
<input type="hidden" name="o_cp_prc[]" value="<?php echo $dc; ?>">
|
||||
<input type="hidden" name="o_cp_subj[]" value="<?php echo $row['cp_subject']; ?>">
|
||||
<?php echo get_text($row['cp_subject']); ?>
|
||||
</td>
|
||||
<td class="td_numbig"><?php echo number_format($dc); ?></td>
|
||||
<td class="td_mngsmall"><button type="button" class="od_cp_apply btn_frmline">적용</button></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
if($row['cp_maximum'] && $dc > $row['cp_maximum'])
|
||||
$dc = $row['cp_maximum'];
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="hidden" name="o_cp_id[]" value="<?php echo $row['cp_id']; ?>">
|
||||
<input type="hidden" name="o_cp_prc[]" value="<?php echo $dc; ?>">
|
||||
<input type="hidden" name="o_cp_subj[]" value="<?php echo $row['cp_subject']; ?>">
|
||||
<?php echo get_text($row['cp_subject']); ?>
|
||||
</td>
|
||||
<td class="td_bignum"><?php echo number_format($dc); ?></td>
|
||||
<td class="td_smallmng"><button type="button" class="od_cp_apply btn_frmline">적용</button></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
} else {
|
||||
echo '<p>사용할 수 있는 쿠폰이 없습니다.</p>';
|
||||
|
||||
@ -166,183 +166,186 @@ function get_intall_file()
|
||||
<div id="sod_frm">
|
||||
<!-- 주문상품 확인 시작 { -->
|
||||
<p>주문하실 상품을 확인하세요.</p>
|
||||
<table id="sod_list" class="basic_tbl">
|
||||
<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>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$tot_point = 0;
|
||||
$tot_sell_price = 0;
|
||||
|
||||
$goods = $goods_it_id = "";
|
||||
$goods_count = -1;
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table id="sod_list">
|
||||
<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>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$tot_point = 0;
|
||||
$tot_sell_price = 0;
|
||||
|
||||
// $s_cart_id 로 현재 장바구니 자료 쿼리
|
||||
$sql = " select a.ct_id,
|
||||
a.it_id,
|
||||
a.it_name,
|
||||
a.ct_price,
|
||||
a.ct_point,
|
||||
a.ct_qty,
|
||||
a.ct_status,
|
||||
a.ct_send_cost,
|
||||
b.ca_id,
|
||||
b.ca_id2,
|
||||
b.ca_id3,
|
||||
b.it_notax
|
||||
from {$g5['g5_shop_cart_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id )
|
||||
where a.od_id = '$s_cart_id'
|
||||
and a.ct_select = '1' ";
|
||||
if($default['de_cart_keep_term']) {
|
||||
$ctime = date('Y-m-d H:i:s', G5_SERVER_TIME - ($default['de_cart_keep_term'] * 86400));
|
||||
$sql .= " and a.ct_time > '$ctime' ";
|
||||
}
|
||||
$sql .= " group by a.it_id ";
|
||||
$sql .= " order by a.ct_id ";
|
||||
$result = sql_query($sql);
|
||||
$goods = $goods_it_id = "";
|
||||
$goods_count = -1;
|
||||
|
||||
$good_info = '';
|
||||
$it_send_cost = 0;
|
||||
$it_cp_count = 0;
|
||||
// $s_cart_id 로 현재 장바구니 자료 쿼리
|
||||
$sql = " select a.ct_id,
|
||||
a.it_id,
|
||||
a.it_name,
|
||||
a.ct_price,
|
||||
a.ct_point,
|
||||
a.ct_qty,
|
||||
a.ct_status,
|
||||
a.ct_send_cost,
|
||||
b.ca_id,
|
||||
b.ca_id2,
|
||||
b.ca_id3,
|
||||
b.it_notax
|
||||
from {$g5['g5_shop_cart_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id )
|
||||
where a.od_id = '$s_cart_id'
|
||||
and a.ct_select = '1' ";
|
||||
if($default['de_cart_keep_term']) {
|
||||
$ctime = date('Y-m-d H:i:s', G5_SERVER_TIME - ($default['de_cart_keep_term'] * 86400));
|
||||
$sql .= " and a.ct_time > '$ctime' ";
|
||||
}
|
||||
$sql .= " group by a.it_id ";
|
||||
$sql .= " order by a.ct_id ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$comm_tax_mny = 0; // 과세금액
|
||||
$comm_vat_mny = 0; // 부가세
|
||||
$comm_free_mny = 0; // 면세금액
|
||||
$tot_tax_mny = 0;
|
||||
$good_info = '';
|
||||
$it_send_cost = 0;
|
||||
$it_cp_count = 0;
|
||||
|
||||
for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
{
|
||||
// 합계금액 계산
|
||||
$sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price,
|
||||
SUM(ct_point * ct_qty) as point,
|
||||
SUM(ct_qty) as qty
|
||||
from {$g5['g5_shop_cart_table']}
|
||||
where it_id = '{$row['it_id']}'
|
||||
and od_id = '$s_cart_id' ";
|
||||
$sum = sql_fetch($sql);
|
||||
$comm_tax_mny = 0; // 과세금액
|
||||
$comm_vat_mny = 0; // 부가세
|
||||
$comm_free_mny = 0; // 면세금액
|
||||
$tot_tax_mny = 0;
|
||||
|
||||
if (!$goods)
|
||||
for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
{
|
||||
//$goods = addslashes($row[it_name]);
|
||||
//$goods = get_text($row[it_name]);
|
||||
$goods = preg_replace("/\'|\"|\||\,|\&|\;/", "", $row['it_name']);
|
||||
$goods_it_id = $row['it_id'];
|
||||
}
|
||||
$goods_count++;
|
||||
// 합계금액 계산
|
||||
$sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price,
|
||||
SUM(ct_point * ct_qty) as point,
|
||||
SUM(ct_qty) as qty
|
||||
from {$g5['g5_shop_cart_table']}
|
||||
where it_id = '{$row['it_id']}'
|
||||
and od_id = '$s_cart_id' ";
|
||||
$sum = sql_fetch($sql);
|
||||
|
||||
// 에스크로 상품정보
|
||||
if($default['de_escrow_use']) {
|
||||
if ($i>0)
|
||||
$good_info .= chr(30);
|
||||
$good_info .= "seq=".($i+1).chr(31);
|
||||
$good_info .= "ordr_numb={$od_id}_".sprintf("%04d", $i).chr(31);
|
||||
$good_info .= "good_name=".addslashes($row['it_name']).chr(31);
|
||||
$good_info .= "good_cntx=".$row['ct_qty'].chr(31);
|
||||
$good_info .= "good_amtx=".$row['ct_price'].chr(31);
|
||||
if (!$goods)
|
||||
{
|
||||
//$goods = addslashes($row[it_name]);
|
||||
//$goods = get_text($row[it_name]);
|
||||
$goods = preg_replace("/\'|\"|\||\,|\&|\;/", "", $row['it_name']);
|
||||
$goods_it_id = $row['it_id'];
|
||||
}
|
||||
$goods_count++;
|
||||
|
||||
// 에스크로 상품정보
|
||||
if($default['de_escrow_use']) {
|
||||
if ($i>0)
|
||||
$good_info .= chr(30);
|
||||
$good_info .= "seq=".($i+1).chr(31);
|
||||
$good_info .= "ordr_numb={$od_id}_".sprintf("%04d", $i).chr(31);
|
||||
$good_info .= "good_name=".addslashes($row['it_name']).chr(31);
|
||||
$good_info .= "good_cntx=".$row['ct_qty'].chr(31);
|
||||
$good_info .= "good_amtx=".$row['ct_price'].chr(31);
|
||||
}
|
||||
|
||||
$image = get_it_image($row['it_id'], 50, 50);
|
||||
|
||||
$it_name = '<b>' . stripslashes($row['it_name']) . '</b>';
|
||||
$it_options = print_item_options($row['it_id'], $s_cart_id);
|
||||
if($it_options) {
|
||||
$it_name .= '<div class="sod_bsk_itopt">'.$it_options.'</div>';
|
||||
}
|
||||
|
||||
// 복합과세금액
|
||||
if($default['de_tax_flag_use']) {
|
||||
if($row['it_notax']) {
|
||||
$comm_free_mny += $sum['price'];
|
||||
} else {
|
||||
$tot_tax_mny += $sum['price'];
|
||||
}
|
||||
}
|
||||
|
||||
$point = $sum['point'];
|
||||
$sell_price = $sum['price'];
|
||||
|
||||
// 쿠폰
|
||||
if($is_member) {
|
||||
$cp_button = '';
|
||||
$cp_count = 0;
|
||||
|
||||
$sql = " select cp_id
|
||||
from {$g5['g5_shop_coupon_table']}
|
||||
where mb_id IN ( '{$member['mb_id']}', '전체회원' )
|
||||
and cp_start <= '".G5_TIME_YMD."'
|
||||
and cp_end >= '".G5_TIME_YMD."'
|
||||
and cp_minimum <= '$sell_price'
|
||||
and (
|
||||
( cp_method = '0' and cp_target = '{$row['it_id']}' )
|
||||
OR
|
||||
( cp_method = '1' and ( cp_target IN ( '{$row['ca_id']}', '{$row['ca_id2']}', '{$row['ca_id3']}' ) ) )
|
||||
) ";
|
||||
$res = sql_query($sql);
|
||||
|
||||
for($k=0; $cp=sql_fetch_array($res); $k++) {
|
||||
if(is_used_coupon($member['mb_id'], $cp['cp_id']))
|
||||
continue;
|
||||
|
||||
$cp_count++;
|
||||
}
|
||||
|
||||
if($cp_count) {
|
||||
$cp_button = '<button type="button" class="it_coupon_btn btn_frmline">적용</button>';
|
||||
$it_cp_count++;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td class="sod_bsk_img"><?php echo $image; ?></td>
|
||||
<td>
|
||||
<input type="hidden" name="it_id[<?php echo $i; ?>]" value="<?php echo $row['it_id']; ?>">
|
||||
<input type="hidden" name="it_name[<?php echo $i; ?>]" value="<?php echo get_text($row['it_name']); ?>">
|
||||
<input type="hidden" name="it_price[<?php echo $i; ?>]" value="<?php echo $sell_price; ?>">
|
||||
<input type="hidden" name="cp_id[<?php echo $i; ?>]" value="">
|
||||
<input type="hidden" name="cp_price[<?php echo $i; ?>]" value="0">
|
||||
<?php if($default['de_tax_flag_use']) { ?>
|
||||
<input type="hidden" name="it_notax[<?php echo $i; ?>]" value="<?php echo $row['it_notax']; ?>">
|
||||
<?php } ?>
|
||||
<?php echo $it_name.$mod_options; ?>
|
||||
</td>
|
||||
<td class="td_num"><?php echo number_format($sum['qty']); ?></td>
|
||||
<td class="td_numbig"><?php echo number_format($row['ct_price']); ?></td>
|
||||
<td class="td_mngsmall"><?php echo $cp_button; ?></td>
|
||||
<td class="td_numbig"><span class="ct_sell_price"><?php echo number_format($sell_price); ?></span></td>
|
||||
<td class="td_numbig"><?php echo number_format($point); ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
$tot_point += $point;
|
||||
$tot_sell_price += $sell_price;
|
||||
} // for 끝
|
||||
|
||||
if ($i == 0) {
|
||||
//echo '<tr><td colspan="7" class="empty_table">장바구니에 담긴 상품이 없습니다.</td></tr>';
|
||||
alert('장바구니가 비어 있습니다.', G5_SHOP_URL.'/cart.php');
|
||||
} else {
|
||||
// 배송비 계산
|
||||
$send_cost = get_sendcost($s_cart_id);
|
||||
}
|
||||
|
||||
$image = get_it_image($row['it_id'], 50, 50);
|
||||
|
||||
$it_name = '<b>' . stripslashes($row['it_name']) . '</b>';
|
||||
$it_options = print_item_options($row['it_id'], $s_cart_id);
|
||||
if($it_options) {
|
||||
$it_name .= '<div class="sod_bsk_itopt">'.$it_options.'</div>';
|
||||
}
|
||||
|
||||
// 복합과세금액
|
||||
// 복합과세처리
|
||||
if($default['de_tax_flag_use']) {
|
||||
if($row['it_notax']) {
|
||||
$comm_free_mny += $sum['price'];
|
||||
} else {
|
||||
$tot_tax_mny += $sum['price'];
|
||||
}
|
||||
$comm_tax_mny = round(($tot_tax_mny + $send_cost) / 1.1);
|
||||
$comm_vat_mny = ($tot_tax_mny + $send_cost) - $comm_tax_mny;
|
||||
}
|
||||
|
||||
$point = $sum['point'];
|
||||
$sell_price = $sum['price'];
|
||||
|
||||
// 쿠폰
|
||||
if($is_member) {
|
||||
$cp_button = '';
|
||||
$cp_count = 0;
|
||||
|
||||
$sql = " select cp_id
|
||||
from {$g5['g5_shop_coupon_table']}
|
||||
where mb_id IN ( '{$member['mb_id']}', '전체회원' )
|
||||
and cp_start <= '".G5_TIME_YMD."'
|
||||
and cp_end >= '".G5_TIME_YMD."'
|
||||
and cp_minimum <= '$sell_price'
|
||||
and (
|
||||
( cp_method = '0' and cp_target = '{$row['it_id']}' )
|
||||
OR
|
||||
( cp_method = '1' and ( cp_target IN ( '{$row['ca_id']}', '{$row['ca_id2']}', '{$row['ca_id3']}' ) ) )
|
||||
) ";
|
||||
$res = sql_query($sql);
|
||||
|
||||
for($k=0; $cp=sql_fetch_array($res); $k++) {
|
||||
if(is_used_coupon($member['mb_id'], $cp['cp_id']))
|
||||
continue;
|
||||
|
||||
$cp_count++;
|
||||
}
|
||||
|
||||
if($cp_count) {
|
||||
$cp_button = '<button type="button" class="it_coupon_btn btn_frmline">적용</button>';
|
||||
$it_cp_count++;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td class="sod_bsk_img"><?php echo $image; ?></td>
|
||||
<td>
|
||||
<input type="hidden" name="it_id[<?php echo $i; ?>]" value="<?php echo $row['it_id']; ?>">
|
||||
<input type="hidden" name="it_name[<?php echo $i; ?>]" value="<?php echo get_text($row['it_name']); ?>">
|
||||
<input type="hidden" name="it_price[<?php echo $i; ?>]" value="<?php echo $sell_price; ?>">
|
||||
<input type="hidden" name="cp_id[<?php echo $i; ?>]" value="">
|
||||
<input type="hidden" name="cp_price[<?php echo $i; ?>]" value="0">
|
||||
<?php if($default['de_tax_flag_use']) { ?>
|
||||
<input type="hidden" name="it_notax[<?php echo $i; ?>]" value="<?php echo $row['it_notax']; ?>">
|
||||
<?php } ?>
|
||||
<?php echo $it_name.$mod_options; ?>
|
||||
</td>
|
||||
<td class="td_num"><?php echo number_format($sum['qty']); ?></td>
|
||||
<td class="td_bignum"><?php echo number_format($row['ct_price']); ?></td>
|
||||
<td class="td_smallmng"><?php echo $cp_button; ?></td>
|
||||
<td class="td_bignum"><span class="ct_sell_price"><?php echo number_format($sell_price); ?></span></td>
|
||||
<td class="td_bignum"><?php echo number_format($point); ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
$tot_point += $point;
|
||||
$tot_sell_price += $sell_price;
|
||||
} // for 끝
|
||||
|
||||
if ($i == 0) {
|
||||
//echo '<tr><td colspan="7" class="empty_table">장바구니에 담긴 상품이 없습니다.</td></tr>';
|
||||
alert('장바구니가 비어 있습니다.', G5_SHOP_URL.'/cart.php');
|
||||
} else {
|
||||
// 배송비 계산
|
||||
$send_cost = get_sendcost($s_cart_id);
|
||||
}
|
||||
|
||||
// 복합과세처리
|
||||
if($default['de_tax_flag_use']) {
|
||||
$comm_tax_mny = round(($tot_tax_mny + $send_cost) / 1.1);
|
||||
$comm_vat_mny = ($tot_tax_mny + $send_cost) - $comm_tax_mny;
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php if ($goods_count) $goods .= ' 외 '.$goods_count.'건'; ?>
|
||||
<!-- } 주문상품 확인 끝 -->
|
||||
@ -615,77 +618,79 @@ function get_intall_file()
|
||||
<section id="sod_frm_orderer">
|
||||
<h2>주문하시는 분</h2>
|
||||
|
||||
<table class="frm_tbl">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="od_name">이름</label></th>
|
||||
<td><input type="text" name="od_name" value="<?php echo $member['mb_name']; ?>" id="od_name" required class="frm_input required" maxlength="20"></td>
|
||||
</tr>
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="od_name">이름</label></th>
|
||||
<td><input type="text" name="od_name" value="<?php echo $member['mb_name']; ?>" id="od_name" required class="frm_input required" maxlength="20"></td>
|
||||
</tr>
|
||||
|
||||
<?php if (!$is_member) { // 비회원이면 ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="od_pwd">비밀번호</label></th>
|
||||
<td>
|
||||
<span class="frm_info">영,숫자 3~20자 (주문서 조회시 필요)</span>
|
||||
<input type="password" name="od_pwd" id="od_pwd" required class="frm_input required" maxlength="20">
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php if (!$is_member) { // 비회원이면 ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="od_pwd">비밀번호</label></th>
|
||||
<td>
|
||||
<span class="frm_info">영,숫자 3~20자 (주문서 조회시 필요)</span>
|
||||
<input type="password" name="od_pwd" id="od_pwd" required class="frm_input required" maxlength="20">
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><label for="od_tel">전화번호</label></th>
|
||||
<td><input type="text" name="od_tel" value="<?php echo $member['mb_tel']; ?>" id="od_tel" required class="frm_input required" maxlength="20"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="od_hp">핸드폰</label></th>
|
||||
<td><input type="text" name="od_hp" value="<?php echo $member['mb_hp']; ?>" id="od_hp" class="frm_input" maxlength="20"></td>
|
||||
</tr>
|
||||
<?php $zip_href = G5_BBS_URL.'/zip.php?frm_name=forderform&frm_zip1=od_zip1&frm_zip2=od_zip2&frm_addr1=od_addr1&frm_addr2=od_addr2'; ?>
|
||||
<tr>
|
||||
<th scope="row">주소</th>
|
||||
<td>
|
||||
<label for="od_zip1" class="sound_only">우편번호 앞자리<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="od_zip1" value="<?php echo $member['mb_zip1'] ?>" id="od_zip1" required class="frm_input required" size="2" maxlength="3">
|
||||
-
|
||||
<label for="od_zip2" class="sound_only">우편번호 뒷자리<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="od_zip2" value="<?php echo $member['mb_zip2'] ?>" id="od_zip2" required class="frm_input required" size="2" maxlength="3">
|
||||
<span id="od_win_zip" style="display:block"></span>
|
||||
<label for="od_addr1" class="sound_only">주소<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="od_addr1" value="<?php echo $member['mb_addr1'] ?>" id="od_addr1" required class="frm_input frm_address required" size="50">
|
||||
<label for="od_addr2" class="sound_only">상세주소<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="od_addr2" value="<?php echo $member['mb_addr2'] ?>" id="od_addr2" required class="frm_input frm_address required" size="50">
|
||||
<script>
|
||||
// 우편번호 자바스크립트 비활성화 대응을 위한 코드
|
||||
$('<a href="<?php echo $zip_href; ?>" class="btn_frmline win_zip_find" target="_blank">우편번호 검색</a><br>').appendTo('#od_win_zip');
|
||||
$("#od_win_zip").css("display", "inline");
|
||||
$("#od_zip1, #od_zip2, #od_addr1").attr('readonly', 'readonly');
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="od_email">E-mail</label></th>
|
||||
<td><input type="text" name="od_email" value="<?php echo $member['mb_email']; ?>" id="od_email" required class="frm_input required" size="35" maxlength="100"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="od_tel">전화번호</label></th>
|
||||
<td><input type="text" name="od_tel" value="<?php echo $member['mb_tel']; ?>" id="od_tel" required class="frm_input required" maxlength="20"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="od_hp">핸드폰</label></th>
|
||||
<td><input type="text" name="od_hp" value="<?php echo $member['mb_hp']; ?>" id="od_hp" class="frm_input" maxlength="20"></td>
|
||||
</tr>
|
||||
<?php $zip_href = G5_BBS_URL.'/zip.php?frm_name=forderform&frm_zip1=od_zip1&frm_zip2=od_zip2&frm_addr1=od_addr1&frm_addr2=od_addr2'; ?>
|
||||
<tr>
|
||||
<th scope="row">주소</th>
|
||||
<td>
|
||||
<label for="od_zip1" class="sound_only">우편번호 앞자리<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="od_zip1" value="<?php echo $member['mb_zip1'] ?>" id="od_zip1" required class="frm_input required" size="3" maxlength="3">
|
||||
-
|
||||
<label for="od_zip2" class="sound_only">우편번호 뒷자리<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="od_zip2" value="<?php echo $member['mb_zip2'] ?>" id="od_zip2" required class="frm_input required" size="3" maxlength="3">
|
||||
<span id="od_win_zip" style="display:block"></span>
|
||||
<label for="od_addr1" class="sound_only">주소<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="od_addr1" value="<?php echo $member['mb_addr1'] ?>" id="od_addr1" required class="frm_input frm_address required" size="50">
|
||||
<label for="od_addr2" class="sound_only">상세주소<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="od_addr2" value="<?php echo $member['mb_addr2'] ?>" id="od_addr2" required class="frm_input frm_address required" size="50">
|
||||
<script>
|
||||
// 우편번호 자바스크립트 비활성화 대응을 위한 코드
|
||||
$('<a href="<?php echo $zip_href; ?>" class="btn_frmline win_zip_find" target="_blank">우편번호 검색</a><br>').appendTo('#od_win_zip');
|
||||
$("#od_win_zip").css("display", "inline");
|
||||
$("#od_zip1, #od_zip2, #od_addr1").attr('readonly', 'readonly');
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="od_email">E-mail</label></th>
|
||||
<td><input type="text" name="od_email" value="<?php echo $member['mb_email']; ?>" id="od_email" required class="frm_input required" size="35" maxlength="100"></td>
|
||||
</tr>
|
||||
|
||||
<?php if ($default['de_hope_date_use']) { // 배송희망일 사용 ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="od_hope_date">희망배송일</label></th>
|
||||
<td>
|
||||
<!-- <select name="od_hope_date" id="od_hope_date">
|
||||
<option value="">선택하십시오.</option>
|
||||
<?php
|
||||
for ($i=0; $i<7; $i++) {
|
||||
$sdate = date("Y-m-d", time()+86400*($default['de_hope_date_after']+$i));
|
||||
echo '<option value="'.$sdate.'">'.$sdate.' ('.get_yoil($sdate).')</option>'.PHP_EOL;
|
||||
}
|
||||
?>
|
||||
</select> -->
|
||||
<input type="text" name="od_hope_date" value="" id="od_hope_date" required class="frm_input required" size="11" maxlength="10" readonly="readonly"> 이후로 배송 바랍니다.
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if ($default['de_hope_date_use']) { // 배송희망일 사용 ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="od_hope_date">희망배송일</label></th>
|
||||
<td>
|
||||
<!-- <select name="od_hope_date" id="od_hope_date">
|
||||
<option value="">선택하십시오.</option>
|
||||
<?php
|
||||
for ($i=0; $i<7; $i++) {
|
||||
$sdate = date("Y-m-d", time()+86400*($default['de_hope_date_after']+$i));
|
||||
echo '<option value="'.$sdate.'">'.$sdate.' ('.get_yoil($sdate).')</option>'.PHP_EOL;
|
||||
}
|
||||
?>
|
||||
</select> -->
|
||||
<input type="text" name="od_hope_date" value="" id="od_hope_date" required class="frm_input required" size="11" maxlength="10" readonly="readonly"> 이후로 배송 바랍니다.
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<!-- } 주문하시는 분 입력 끝 -->
|
||||
|
||||
@ -693,105 +698,107 @@ function get_intall_file()
|
||||
<section id="sod_frm_taker">
|
||||
<h2>받으시는 분</h2>
|
||||
|
||||
<table class="frm_tbl">
|
||||
<tbody>
|
||||
<?php
|
||||
if($is_member) {
|
||||
// 배송지 이력
|
||||
$addr_list = '';
|
||||
$sep = chr(30);
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<tbody>
|
||||
<?php
|
||||
if($is_member) {
|
||||
// 배송지 이력
|
||||
$addr_list = '';
|
||||
$sep = chr(30);
|
||||
|
||||
// 주문자와 동일
|
||||
$addr_list .= '<input type="radio" name="ad_sel_addr" value="same" id="ad_sel_addr_same">'.PHP_EOL;
|
||||
$addr_list .= '<label for="ad_sel_addr_same">주문자와 동일</label>'.PHP_EOL;
|
||||
// 주문자와 동일
|
||||
$addr_list .= '<input type="radio" name="ad_sel_addr" value="same" id="ad_sel_addr_same">'.PHP_EOL;
|
||||
$addr_list .= '<label for="ad_sel_addr_same">주문자와 동일</label>'.PHP_EOL;
|
||||
|
||||
// 기본배송지
|
||||
$sql = " select *
|
||||
from {$g5['g5_shop_order_address_table']}
|
||||
where mb_id = '{$member['mb_id']}'
|
||||
and ad_default = '1' ";
|
||||
$row = sql_fetch($sql);
|
||||
if($row['ad_id']) {
|
||||
$val1 = $row['ad_name'].$sep.$row['ad_tel'].$sep.$row['ad_hp'].$sep.$row['ad_zip1'].$sep.$row['ad_zip2'].$sep.$row['ad_addr1'].$sep.$row['ad_addr2'].$sep.$row['ad_subject'];
|
||||
$addr_list .= '<input type="radio" name="ad_sel_addr" value="'.$val1.'" id="ad_sel_addr_def">'.PHP_EOL;
|
||||
$addr_list .= '<label for="ad_sel_addr_def">기본배송지</label>'.PHP_EOL;
|
||||
// 기본배송지
|
||||
$sql = " select *
|
||||
from {$g5['g5_shop_order_address_table']}
|
||||
where mb_id = '{$member['mb_id']}'
|
||||
and ad_default = '1' ";
|
||||
$row = sql_fetch($sql);
|
||||
if($row['ad_id']) {
|
||||
$val1 = $row['ad_name'].$sep.$row['ad_tel'].$sep.$row['ad_hp'].$sep.$row['ad_zip1'].$sep.$row['ad_zip2'].$sep.$row['ad_addr1'].$sep.$row['ad_addr2'].$sep.$row['ad_subject'];
|
||||
$addr_list .= '<input type="radio" name="ad_sel_addr" value="'.$val1.'" id="ad_sel_addr_def">'.PHP_EOL;
|
||||
$addr_list .= '<label for="ad_sel_addr_def">기본배송지</label>'.PHP_EOL;
|
||||
}
|
||||
|
||||
// 최근배송지
|
||||
$sql = " select *
|
||||
from {$g5['g5_shop_order_address_table']}
|
||||
where mb_id = '{$member['mb_id']}'
|
||||
and ad_default = '0'
|
||||
order by ad_id desc
|
||||
limit 2 ";
|
||||
$result = sql_query($sql);
|
||||
for($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$val1 = $row['ad_name'].$sep.$row['ad_tel'].$sep.$row['ad_hp'].$sep.$row['ad_zip1'].$sep.$row['ad_zip2'].$sep.$row['ad_addr1'].$sep.$row['ad_addr2'].$sep.$row['ad_subject'];
|
||||
$val2 = '<label for="ad_sel_addr_'.($i+1).'">최근배송지('.($row['ad_subject'] ? $row['ad_subject'] : $row['ad_name']).')</label>';
|
||||
$addr_list .= '<input type="radio" name="ad_sel_addr" value="'.$val1.'" id="ad_sel_addr_'.($i+1).'"> '.PHP_EOL.$val2.PHP_EOL;
|
||||
}
|
||||
|
||||
$addr_list .= '<input type="radio" name="ad_sel_addr" value="new" id="od_sel_addr_new">'.PHP_EOL;
|
||||
$addr_list .= '<label for="od_sel_addr_new">신규배송지</label>'.PHP_EOL;
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row">배송지선택</th>
|
||||
<td>
|
||||
<?php echo $addr_list; ?>
|
||||
<a href="<?php echo G5_SHOP_URL; ?>/orderaddress.php" id="order_address" class="btn_frmline">배송지목록</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="ad_subject">배송지명</label></th>
|
||||
<td>
|
||||
<input type="text" name="ad_subject" id="ad_subject" class="frm_input" maxlength="20">
|
||||
<input type="checkbox" name="ad_default" id="ad_default" value="1">
|
||||
<label for="ad_default">기본배송지로 설정</label>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
// 최근배송지
|
||||
$sql = " select *
|
||||
from {$g5['g5_shop_order_address_table']}
|
||||
where mb_id = '{$member['mb_id']}'
|
||||
and ad_default = '0'
|
||||
order by ad_id desc
|
||||
limit 2 ";
|
||||
$result = sql_query($sql);
|
||||
for($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$val1 = $row['ad_name'].$sep.$row['ad_tel'].$sep.$row['ad_hp'].$sep.$row['ad_zip1'].$sep.$row['ad_zip2'].$sep.$row['ad_addr1'].$sep.$row['ad_addr2'].$sep.$row['ad_subject'];
|
||||
$val2 = '<label for="ad_sel_addr_'.($i+1).'">최근배송지('.($row['ad_subject'] ? $row['ad_subject'] : $row['ad_name']).')</label>';
|
||||
$addr_list .= '<input type="radio" name="ad_sel_addr" value="'.$val1.'" id="ad_sel_addr_'.($i+1).'"> '.PHP_EOL.$val2.PHP_EOL;
|
||||
}
|
||||
|
||||
$addr_list .= '<input type="radio" name="ad_sel_addr" value="new" id="od_sel_addr_new">'.PHP_EOL;
|
||||
$addr_list .= '<label for="od_sel_addr_new">신규배송지</label>'.PHP_EOL;
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row">배송지선택</th>
|
||||
<td>
|
||||
<?php echo $addr_list; ?>
|
||||
<a href="<?php echo G5_SHOP_URL; ?>/orderaddress.php" id="order_address" class="btn_frmline">배송지목록</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="ad_subject">배송지명</label></th>
|
||||
<td>
|
||||
<input type="text" name="ad_subject" id="ad_subject" class="frm_input" maxlength="20">
|
||||
<input type="checkbox" name="ad_default" id="ad_default" value="1">
|
||||
<label for="ad_default">기본배송지로 설정</label>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row"><label for="od_b_name">이름</label></th>
|
||||
<td><input type="text" name="od_b_name" id="od_b_name" required class="frm_input required" maxlength="20"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="od_b_tel">전화번호</label></th>
|
||||
<td><input type="text" name="od_b_tel" id="od_b_tel" required class="frm_input required" maxlength="20"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="od_b_hp">핸드폰</label></th>
|
||||
<td><input type="text" name="od_b_hp" id="od_b_hp" class="frm_input" maxlength="20"></td>
|
||||
</tr>
|
||||
<?php $zip_href = G5_BBS_URL.'/zip.php?frm_name=forderform&frm_zip1=od_b_zip1&frm_zip2=od_b_zip2&frm_addr1=od_b_addr1&frm_addr2=od_b_addr2'; ?>
|
||||
<tr>
|
||||
<th scope="row">주소</th>
|
||||
<td id="sod_frm_addr">
|
||||
<label for="od_b_zip1" class="sound_only">우편번호 앞자리<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="od_b_zip1" id="od_b_zip1" required class="frm_input required" size="3" maxlength="3">
|
||||
-
|
||||
<label for="od_b_zip2" class="sound_only">우편번호 뒷자리<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="od_b_zip2" id="od_b_zip2" required class="frm_input required" size="3" maxlength="3">
|
||||
<span id="od_winb_zip" style="display:block"></span>
|
||||
<label for="od_b_addr1" class="sound_only">주소<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="od_b_addr1" id="od_b_addr1" required class="frm_input frm_address required" size="50">
|
||||
<label for="od_b_addr2" class="sound_only">상세주소<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="od_b_addr2" id="od_b_addr2" required class="frm_input frm_address required" size="50">
|
||||
<script>
|
||||
// 우편번호 자바스크립트 비활성화 대응을 위한 코드
|
||||
$('<a href="<?php echo $zip_href; ?>" class="btn_frmline win_zip_find" target="_blank">우편번호 검색</a><br>').appendTo('#od_winb_zip');
|
||||
$("#od_winb_zip").css("display", "inline");
|
||||
$("#od_b_zip1, #od_b_zip2, #od_b_addr1").attr('readonly', 'readonly');
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="od_memo">전하실말씀</label></th>
|
||||
<td><textarea name="od_memo" id="od_memo"></textarea></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row"><label for="od_b_name">이름</label></th>
|
||||
<td><input type="text" name="od_b_name" id="od_b_name" required class="frm_input required" maxlength="20"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="od_b_tel">전화번호</label></th>
|
||||
<td><input type="text" name="od_b_tel" id="od_b_tel" required class="frm_input required" maxlength="20"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="od_b_hp">핸드폰</label></th>
|
||||
<td><input type="text" name="od_b_hp" id="od_b_hp" class="frm_input" maxlength="20"></td>
|
||||
</tr>
|
||||
<?php $zip_href = G5_BBS_URL.'/zip.php?frm_name=forderform&frm_zip1=od_b_zip1&frm_zip2=od_b_zip2&frm_addr1=od_b_addr1&frm_addr2=od_b_addr2'; ?>
|
||||
<tr>
|
||||
<th scope="row">주소</th>
|
||||
<td id="sod_frm_addr">
|
||||
<label for="od_b_zip1" class="sound_only">우편번호 앞자리<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="od_b_zip1" id="od_b_zip1" required class="frm_input required" size="3" maxlength="3">
|
||||
-
|
||||
<label for="od_b_zip2" class="sound_only">우편번호 뒷자리<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="od_b_zip2" id="od_b_zip2" required class="frm_input required" size="3" maxlength="3">
|
||||
<span id="od_winb_zip" style="display:block"></span>
|
||||
<label for="od_b_addr1" class="sound_only">주소<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="od_b_addr1" id="od_b_addr1" required class="frm_input frm_address required" size="50">
|
||||
<label for="od_b_addr2" class="sound_only">상세주소<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="od_b_addr2" id="od_b_addr2" required class="frm_input frm_address required" size="50">
|
||||
<script>
|
||||
// 우편번호 자바스크립트 비활성화 대응을 위한 코드
|
||||
$('<a href="<?php echo $zip_href; ?>" class="btn_frmline win_zip_find" target="_blank">우편번호 검색</a><br>').appendTo('#od_winb_zip');
|
||||
$("#od_winb_zip").css("display", "inline");
|
||||
$("#od_b_zip1, #od_b_zip2, #od_b_addr1").attr('readonly', 'readonly');
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="od_memo">전하실말씀</label></th>
|
||||
<td><textarea name="od_memo" id="od_memo"></textarea></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<!-- } 받으시는 분 입력 끝 -->
|
||||
|
||||
@ -838,44 +845,46 @@ function get_intall_file()
|
||||
<section id="sod_frm_pay">
|
||||
<h2>결제정보</h2>
|
||||
|
||||
<table class="frm_tbl">
|
||||
<tbody>
|
||||
<?php if($oc_cnt > 0) { ?>
|
||||
<tr>
|
||||
<th scope="row">주문할인쿠폰</th>
|
||||
<td>
|
||||
<input type="hidden" name="od_cp_id" value="">
|
||||
<button type="button" id="od_coupon_btn" class="btn_frmline">쿠폰적용</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">주문할인금액</th>
|
||||
<td><span id="od_cp_price">0</span>원</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php if($sc_cnt > 0) { ?>
|
||||
<tr>
|
||||
<th scope="row">배송비할인쿠폰</th>
|
||||
<td>
|
||||
<input type="hidden" name="sc_cp_id" value="">
|
||||
<button type="button" id="sc_coupon_btn" class="btn_frmline">쿠폰적용</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">배송비할인금액</th>
|
||||
<td><span id="sc_cp_price">0</span>원</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<th>총 주문금액</th>
|
||||
<td><span id="od_tot_price"><?php echo number_format($tot_price); ?></span>원</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>추가배송비</th>
|
||||
<td><span id="od_send_cost2">0</span>원 (지역에 따라 추가되는 도선료 등의 배송비입니다.)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<tbody>
|
||||
<?php if($oc_cnt > 0) { ?>
|
||||
<tr>
|
||||
<th scope="row">주문할인쿠폰</th>
|
||||
<td>
|
||||
<input type="hidden" name="od_cp_id" value="">
|
||||
<button type="button" id="od_coupon_btn" class="btn_frmline">쿠폰적용</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">주문할인금액</th>
|
||||
<td><span id="od_cp_price">0</span>원</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php if($sc_cnt > 0) { ?>
|
||||
<tr>
|
||||
<th scope="row">배송비할인쿠폰</th>
|
||||
<td>
|
||||
<input type="hidden" name="sc_cp_id" value="">
|
||||
<button type="button" id="sc_coupon_btn" class="btn_frmline">쿠폰적용</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">배송비할인금액</th>
|
||||
<td><span id="sc_cp_price">0</span>원</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<th>총 주문금액</th>
|
||||
<td><span id="od_tot_price"><?php echo number_format($tot_price); ?></span>원</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>추가배송비</th>
|
||||
<td><span id="od_send_cost2">0</span>원 (지역에 따라 추가되는 도선료 등의 배송비입니다.)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if (!$default['de_card_point'])
|
||||
|
||||
@ -264,12 +264,12 @@ if ($od_temp_point)
|
||||
|
||||
$i_price = $i_price + $i_send_cost + $i_send_cost2 - $i_temp_point - $i_send_coupon;
|
||||
|
||||
$od_status = '주문';
|
||||
if ($od_settle_case == "무통장")
|
||||
{
|
||||
$od_receipt_point = $i_temp_point;
|
||||
$od_receipt_price = 0;
|
||||
$od_misu = $i_price - $od_receipt_price;
|
||||
$od_status = '주문';
|
||||
}
|
||||
else if ($od_settle_case == "계좌이체")
|
||||
{
|
||||
@ -285,7 +285,8 @@ else if ($od_settle_case == "계좌이체")
|
||||
$od_bank_account = $bank_name;
|
||||
$pg_price = $amount;
|
||||
$od_misu = $i_price - $od_receipt_price;
|
||||
$od_status = '입금';
|
||||
if($od_misu == 0)
|
||||
$od_status = '입금';
|
||||
}
|
||||
else if ($od_settle_case == "가상계좌")
|
||||
{
|
||||
@ -300,7 +301,6 @@ else if ($od_settle_case == "가상계좌")
|
||||
$od_deposit_name = $depositor;
|
||||
$pg_price = $amount;
|
||||
$od_misu = $i_price - $od_receipt_price;
|
||||
$od_status = '주문';
|
||||
}
|
||||
else if ($od_settle_case == "휴대폰")
|
||||
{
|
||||
@ -313,7 +313,8 @@ else if ($od_settle_case == "휴대폰")
|
||||
$od_bank_account = $commid.' '.$mobile_no;
|
||||
$pg_price = $amount;
|
||||
$od_misu = $i_price - $od_receipt_price;
|
||||
$od_status = '입금';
|
||||
if($od_misu == 0)
|
||||
$od_status = '입금';
|
||||
}
|
||||
else if ($od_settle_case == "신용카드")
|
||||
{
|
||||
@ -328,7 +329,8 @@ else if ($od_settle_case == "신용카드")
|
||||
$od_bank_account = $card_name;
|
||||
$pg_price = $amount;
|
||||
$od_misu = $i_price - $od_receipt_price;
|
||||
$od_status = '입금';
|
||||
if($od_misu == 0)
|
||||
$od_status = '입금';
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -431,15 +433,16 @@ if(!$result) {
|
||||
die_utf8('<p>고객님의 주문 정보를 처리하는 중 오류가 발생해서 주문이 완료되지 않았습니다.</p><p>KCP를 이용한 전자결제(신용카드, 계좌이체, 가상계좌 등)은 자동 취소되었습니다.');
|
||||
}
|
||||
|
||||
// 장바구니 쇼핑에서 주문으로
|
||||
// 장바구니 상태변경
|
||||
// 신용카드로 주문하면서 신용카드 포인트 사용하지 않는다면 포인트 부여하지 않음
|
||||
$cart_status = $od_status;
|
||||
$sql_card_point = "";
|
||||
if ($od_receipt_price > 0 && !$default['de_card_point']) {
|
||||
$sql_card_point = " , ct_point = '0' ";
|
||||
}
|
||||
$sql = "update {$g5['g5_shop_cart_table']}
|
||||
set od_id = '$od_id',
|
||||
ct_status = '주문'
|
||||
ct_status = '$cart_status'
|
||||
$sql_card_point
|
||||
where od_id = '$tmp_cart_id'
|
||||
and ct_select = '1' ";
|
||||
|
||||
@ -7,51 +7,53 @@ if (!defined("_ORDERINQUIRY_")) exit; // 개별 페이지 접근 불가
|
||||
<!-- 주문 내역 목록 시작 { -->
|
||||
<?php if (!$limit) { ?>총 <?php echo $cnt; ?> 건<?php } ?>
|
||||
|
||||
<table class="basic_tbl">
|
||||
<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>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$sql = " select *,
|
||||
(od_cart_coupon + od_coupon + od_send_coupon) as couponprice
|
||||
from {$g5['g5_shop_order_table']}
|
||||
where mb_id = '{$member['mb_id']}'
|
||||
order by od_id desc
|
||||
$limit ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$uid = md5($row['od_id'].$row['od_time'].$row['od_ip']);
|
||||
?>
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<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>
|
||||
<th scope="col">미입금액</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$sql = " select *,
|
||||
(od_cart_coupon + od_coupon + od_send_coupon) as couponprice
|
||||
from {$g5['g5_shop_order_table']}
|
||||
where mb_id = '{$member['mb_id']}'
|
||||
order by od_id desc
|
||||
$limit ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$uid = md5($row['od_id'].$row['od_time'].$row['od_ip']);
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<input type="hidden" name="ct_id[<?php echo $i; ?>]" value="<?php echo $row['ct_id']; ?>">
|
||||
<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>
|
||||
</td>
|
||||
<td><?php echo substr($row['od_time'],0,16); ?> (<?php echo get_yoil($row['od_time']); ?>)</td>
|
||||
<td class="td_num"><?php echo $row['od_cart_count']; ?></td>
|
||||
<td class="td_bignum"><?php echo display_price($row['od_cart_price'] + $row['od_send_cost'] + $row['od_send_cost2']); ?></td>
|
||||
<td class="td_bignum"><?php echo display_price($row['couponprice']); ?></td>
|
||||
<td class="td_bignum"><?php echo display_price($row['od_receipt_price']); ?></td>
|
||||
<td class="td_bignum"><?php echo display_price($row['od_misu']); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="hidden" name="ct_id[<?php echo $i; ?>]" value="<?php echo $row['ct_id']; ?>">
|
||||
<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>
|
||||
</td>
|
||||
<td><?php echo substr($row['od_time'],0,16); ?> (<?php echo get_yoil($row['od_time']); ?>)</td>
|
||||
<td class="td_num"><?php echo $row['od_cart_count']; ?></td>
|
||||
<td class="td_numbig"><?php echo display_price($row['od_cart_price'] + $row['od_send_cost'] + $row['od_send_cost2']); ?></td>
|
||||
<td class="td_numbig"><?php echo display_price($row['couponprice']); ?></td>
|
||||
<td class="td_numbig"><?php echo display_price($row['od_receipt_price']); ?></td>
|
||||
<td class="td_numbig"><?php echo display_price($row['od_misu']); ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($i == 0)
|
||||
echo '<tr><td colspan="7" class="empty_table">주문 내역이 없습니다.</td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
if ($i == 0)
|
||||
echo '<tr><td colspan="7" class="empty_table">주문 내역이 없습니다.</td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- } 주문 내역 목록 끝 -->
|
||||
@ -76,57 +76,59 @@ if(openwin != null) {
|
||||
<a href="./item.php?it_id=<?php echo $row['it_id']; ?>"><?php echo $image; ?> <?php echo $row['it_name']; ?></a>
|
||||
</p>
|
||||
|
||||
<table class="basic_tbl">
|
||||
<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
|
||||
$sql = " select ct_id, it_name, ct_option, ct_qty, ct_price, ct_point, ct_status, 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);
|
||||
$ct_list = array();
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<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
|
||||
$sql = " select ct_id, it_name, ct_option, ct_qty, ct_price, ct_point, ct_status, 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);
|
||||
$ct_list = array();
|
||||
|
||||
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'];
|
||||
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'];
|
||||
|
||||
$sell_price = $opt_price * $opt['ct_qty'];
|
||||
$point = $opt['ct_point'] * $opt['ct_qty'];
|
||||
$sell_price = $opt_price * $opt['ct_qty'];
|
||||
$point = $opt['ct_point'] * $opt['ct_qty'];
|
||||
|
||||
$ct_list[$opt['ct_id']]['name'] = $opt['it_name'];
|
||||
$ct_list[$opt['ct_id']]['option'] = $opt['ct_option'];
|
||||
?>
|
||||
<tr>
|
||||
<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>
|
||||
<td class="td_num"><?php echo number_format($sell_price); ?></td>
|
||||
<td class="td_num"><?php echo number_format($point); ?></td>
|
||||
<td class="td_smallmng"><?php echo $opt['ct_status']; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
$tot_point += $point;
|
||||
$ct_list[$opt['ct_id']]['name'] = $opt['it_name'];
|
||||
$ct_list[$opt['ct_id']]['option'] = $opt['ct_option'];
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $opt['ct_option']; ?></td>
|
||||
<td class="td_mngsmall"><?php echo number_format($opt['ct_qty']); ?></td>
|
||||
<td class="td_numbig"><?php echo number_format($opt_price); ?></td>
|
||||
<td class="td_num"><?php echo number_format($sell_price); ?></td>
|
||||
<td class="td_num"><?php echo number_format($point); ?></td>
|
||||
<td class="td_mngsmall"><?php echo $opt['ct_status']; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
$tot_point += $point;
|
||||
|
||||
$st_count1++;
|
||||
if($opt['ct_status'] == '주문')
|
||||
$st_count2++;
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
$st_count1++;
|
||||
if($opt['ct_status'] == '주문')
|
||||
$st_count2++;
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
@ -226,7 +228,8 @@ if(openwin != null) {
|
||||
<section id="sod_fin_pay">
|
||||
<h3>결제정보</h3>
|
||||
|
||||
<table class="basic_tbl">
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col>
|
||||
@ -364,131 +367,140 @@ if(openwin != null) {
|
||||
|
||||
<section id="sod_fin_orderer">
|
||||
<h3>주문하신 분</h3>
|
||||
<table class="basic_tbl">
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">이 름</th>
|
||||
<td><?php echo $od['od_name']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">전화번호</th>
|
||||
<td><?php echo $od['od_tel']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">핸드폰</th>
|
||||
<td><?php echo $od['od_hp']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">주 소</th>
|
||||
<td><?php echo sprintf("(%s-%s) %s %s", $od['od_zip1'], $od['od_zip2'], $od['od_addr1'], $od['od_addr2']); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">E-mail</th>
|
||||
<td><?php echo $od['od_email']; ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">이 름</th>
|
||||
<td><?php echo $od['od_name']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">전화번호</th>
|
||||
<td><?php echo $od['od_tel']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">핸드폰</th>
|
||||
<td><?php echo $od['od_hp']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">주 소</th>
|
||||
<td><?php echo sprintf("(%s-%s) %s %s", $od['od_zip1'], $od['od_zip2'], $od['od_addr1'], $od['od_addr2']); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">E-mail</th>
|
||||
<td><?php echo $od['od_email']; ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="sod_fin_receiver">
|
||||
<h3>받으시는 분</h3>
|
||||
<table class="basic_tbl">
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">이 름</th>
|
||||
<td><?php echo $od['od_b_name']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">전화번호</th>
|
||||
<td><?php echo $od['od_b_tel']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">핸드폰</th>
|
||||
<td><?php echo $od['od_b_hp']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">주 소</th>
|
||||
<td><?php echo sprintf("(%s-%s) %s %s", $od['od_b_zip1'], $od['od_b_zip2'], $od['od_b_addr1'], $od['od_b_addr2']); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
// 희망배송일을 사용한다면
|
||||
if ($default['de_hope_date_use'])
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row">희망배송일</td>
|
||||
<td><?php echo substr($od['od_hope_date'],0,10).' ('.get_yoil($od['od_hope_date']).')' ;?></td>
|
||||
</tr>
|
||||
<?php }
|
||||
if ($od['od_memo'])
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row">전하실 말씀</td>
|
||||
<td><?php echo conv_content($od['od_memo'], 0); ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">이 름</th>
|
||||
<td><?php echo $od['od_b_name']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">전화번호</th>
|
||||
<td><?php echo $od['od_b_tel']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">핸드폰</th>
|
||||
<td><?php echo $od['od_b_hp']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">주 소</th>
|
||||
<td><?php echo sprintf("(%s-%s) %s %s", $od['od_b_zip1'], $od['od_b_zip2'], $od['od_b_addr1'], $od['od_b_addr2']); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
// 희망배송일을 사용한다면
|
||||
if ($default['de_hope_date_use'])
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row">희망배송일</td>
|
||||
<td><?php echo substr($od['od_hope_date'],0,10).' ('.get_yoil($od['od_hope_date']).')' ;?></td>
|
||||
</tr>
|
||||
<?php }
|
||||
if ($od['od_memo'])
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row">전하실 말씀</td>
|
||||
<td><?php echo conv_content($od['od_memo'], 0); ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="sod_fin_dvr">
|
||||
<h3>배송정보</h3>
|
||||
<table class="basic_tbl">
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<?php
|
||||
// 배송회사 정보
|
||||
$dl = sql_fetch(" select * from {$g5['g5_shop_delivery_table']} where dl_id = '{$od['dl_id']}' ");
|
||||
|
||||
if ($od['od_invoice'] || !$od['misu'])
|
||||
{
|
||||
if (is_array($dl))
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<?php
|
||||
// 배송회사 정보
|
||||
$dl = sql_fetch(" select * from {$g5['g5_shop_delivery_table']} where dl_id = '{$od['dl_id']}' ");
|
||||
|
||||
if ($od['od_invoice'] || !$od['misu'])
|
||||
{
|
||||
// get 으로 날리는 경우 운송장번호를 넘김
|
||||
if (strpos($dl['dl_url'], "=")) $invoice = $od['od_invoice'];
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row">배송회사</th>
|
||||
<td><?php echo $dl['dl_company']; ?> [<a href="<?php echo $dl['dl_url'].$invoice; ?>" target="_blank">배송조회하기</a>]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">운송장번호</th>
|
||||
<td><?php echo $od['od_invoice']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">배송일시</th>
|
||||
<td><?php echo $od['od_invoice_time']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>고객센터 전화</th>
|
||||
<td><?php echo $dl['dl_tel']; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
if (is_array($dl))
|
||||
{
|
||||
// get 으로 날리는 경우 운송장번호를 넘김
|
||||
if (strpos($dl['dl_url'], "=")) $invoice = $od['od_invoice'];
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row">배송회사</th>
|
||||
<td><?php echo $dl['dl_company']; ?> [<a href="<?php echo $dl['dl_url'].$invoice; ?>" target="_blank">배송조회하기</a>]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">운송장번호</th>
|
||||
<td><?php echo $od['od_invoice']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">배송일시</th>
|
||||
<td><?php echo $od['od_invoice_time']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>고객센터 전화</th>
|
||||
<td><?php echo $dl['dl_tel']; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td class="empty_table">아직 배송하지 않았거나 배송정보를 입력하지 못하였습니다.</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td class="empty_table">아직 배송하지 않았거나 배송정보를 입력하지 못하였습니다.</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
|
||||
@ -42,47 +42,49 @@ $count = mysql_num_rows($result);
|
||||
<!-- 쿠폰 선택 시작 { -->
|
||||
<div id="it_coupon_frm">
|
||||
<?php if($count > 0) { ?>
|
||||
<table class="basic_tbl">
|
||||
<caption>쿠폰 선택</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<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++) {
|
||||
// 사용한 쿠폰인지 체크
|
||||
if(is_used_coupon($member['mb_id'], $row['cp_id']))
|
||||
continue;
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption>쿠폰 선택</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<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++) {
|
||||
// 사용한 쿠폰인지 체크
|
||||
if(is_used_coupon($member['mb_id'], $row['cp_id']))
|
||||
continue;
|
||||
|
||||
$dc = 0;
|
||||
if($row['cp_type']) {
|
||||
$dc = floor(($item_price * ($row['cp_price'] / 100)) / $row['cp_trunc']) * $row['cp_trunc'];
|
||||
} else {
|
||||
$dc = $row['cp_price'];
|
||||
$dc = 0;
|
||||
if($row['cp_type']) {
|
||||
$dc = floor(($item_price * ($row['cp_price'] / 100)) / $row['cp_trunc']) * $row['cp_trunc'];
|
||||
} else {
|
||||
$dc = $row['cp_price'];
|
||||
}
|
||||
|
||||
if($row['cp_maximum'] && $dc > $row['cp_maximum'])
|
||||
$dc = $row['cp_maximum'];
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="hidden" name="f_cp_id[]" value="<?php echo $row['cp_id']; ?>">
|
||||
<input type="hidden" name="f_cp_prc[]" value="<?php echo $dc; ?>">
|
||||
<input type="hidden" name="f_cp_subj[]" value="<?php echo $row['cp_subject']; ?>">
|
||||
<?php echo get_text($row['cp_subject']); ?>
|
||||
</td>
|
||||
<td class="td_numbig"><?php echo number_format($dc); ?></td>
|
||||
<td class="td_mngsmall"><button type="button" class="cp_apply btn_frmline">적용</button></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
if($row['cp_maximum'] && $dc > $row['cp_maximum'])
|
||||
$dc = $row['cp_maximum'];
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="hidden" name="f_cp_id[]" value="<?php echo $row['cp_id']; ?>">
|
||||
<input type="hidden" name="f_cp_prc[]" value="<?php echo $dc; ?>">
|
||||
<input type="hidden" name="f_cp_subj[]" value="<?php echo $row['cp_subject']; ?>">
|
||||
<?php echo get_text($row['cp_subject']); ?>
|
||||
</td>
|
||||
<td class="td_bignum"><?php echo number_format($dc); ?></td>
|
||||
<td class="td_smallmng"><button type="button" class="cp_apply btn_frmline">적용</button></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
} else {
|
||||
echo '<p>사용할 수 있는 쿠폰이 없습니다.</p>';
|
||||
|
||||
@ -22,50 +22,52 @@ $count = mysql_num_rows($result);
|
||||
<!-- 쿠폰선택 시작 { -->
|
||||
<div id="sc_coupon_frm">
|
||||
<?php if($count > 0) { ?>
|
||||
<table class="basic_tbl">
|
||||
<caption>쿠폰 선택</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<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++) {
|
||||
// 사용한 쿠폰인지 체크
|
||||
if(is_used_coupon($member['mb_id'], $row['cp_id']))
|
||||
continue;
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption>쿠폰 선택</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<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++) {
|
||||
// 사용한 쿠폰인지 체크
|
||||
if(is_used_coupon($member['mb_id'], $row['cp_id']))
|
||||
continue;
|
||||
|
||||
$dc = 0;
|
||||
if($row['cp_type']) {
|
||||
$dc = floor(($send_cost * ($row['cp_price'] / 100)) / $row['cp_trunc']) * $row['cp_trunc'];
|
||||
} else {
|
||||
$dc = $row['cp_price'];
|
||||
$dc = 0;
|
||||
if($row['cp_type']) {
|
||||
$dc = floor(($send_cost * ($row['cp_price'] / 100)) / $row['cp_trunc']) * $row['cp_trunc'];
|
||||
} else {
|
||||
$dc = $row['cp_price'];
|
||||
}
|
||||
|
||||
if($row['cp_maximum'] && $dc > $row['cp_maximum'])
|
||||
$dc = $row['cp_maximum'];
|
||||
|
||||
if($dc > $send_cost)
|
||||
$dc = $send_cost;
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="hidden" name="s_cp_id[]" value="<?php echo $row['cp_id']; ?>">
|
||||
<input type="hidden" name="s_cp_prc[]" value="<?php echo $dc; ?>">
|
||||
<input type="hidden" name="s_cp_subj[]" value="<?php echo $row['cp_subject']; ?>">
|
||||
<?php echo get_text($row['cp_subject']); ?>
|
||||
</td>
|
||||
<td class="td_numbig"><?php echo number_format($dc); ?></td>
|
||||
<td class="td_mngsmall"><button type="button" class="sc_cp_apply btn_frmline">적용</button></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
if($row['cp_maximum'] && $dc > $row['cp_maximum'])
|
||||
$dc = $row['cp_maximum'];
|
||||
|
||||
if($dc > $send_cost)
|
||||
$dc = $send_cost;
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="hidden" name="s_cp_id[]" value="<?php echo $row['cp_id']; ?>">
|
||||
<input type="hidden" name="s_cp_prc[]" value="<?php echo $dc; ?>">
|
||||
<input type="hidden" name="s_cp_subj[]" value="<?php echo $row['cp_subject']; ?>">
|
||||
<?php echo get_text($row['cp_subject']); ?>
|
||||
</td>
|
||||
<td class="td_bignum"><?php echo number_format($dc); ?></td>
|
||||
<td class="td_smallmng"><button type="button" class="sc_cp_apply btn_frmline">적용</button></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
} else {
|
||||
echo '<p>사용할 수 있는 쿠폰이 없습니다.</p>';
|
||||
|
||||
@ -347,26 +347,28 @@ function get_intall_file()
|
||||
<section id="sod_frm_pay">
|
||||
<h2>개인결제정보</h2>
|
||||
|
||||
<table class="frm_tbl">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>결제금액</th>
|
||||
<td><?php echo display_price($pp['pp_price']); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="pp_name">이름</label></th>
|
||||
<td><input type="text" name="pp_name" value="<?php echo $pp['pp_name']; ?>" id="pp_name" required class="required frm_input"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="pp_email">이메일</label></th>
|
||||
<td><input type="text" name="pp_email" value="<?php echo $member['mb_email']; ?>" id="pp_email" required class="required frm_input"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="pp_hp">휴대폰</label></th>
|
||||
<td><input type="text" name="pp_hp" value="<?php echo $member['mb_hp']; ?>" id="pp_hp" class="frm_input"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>결제금액</th>
|
||||
<td><?php echo display_price($pp['pp_price']); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="pp_name">이름</label></th>
|
||||
<td><input type="text" name="pp_name" value="<?php echo $pp['pp_name']; ?>" id="pp_name" required class="required frm_input"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="pp_email">이메일</label></th>
|
||||
<td><input type="text" name="pp_email" value="<?php echo $member['mb_email']; ?>" id="pp_email" required class="required frm_input"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="pp_hp">휴대폰</label></th>
|
||||
<td><input type="text" name="pp_hp" value="<?php echo $member['mb_hp']; ?>" id="pp_hp" class="frm_input"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if (!$default['de_card_point'])
|
||||
|
||||
@ -75,88 +75,90 @@ if(openwin != null) {
|
||||
<section id="sod_fin_pay">
|
||||
<h3>결제정보</h3>
|
||||
|
||||
<table class="basic_tbl">
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<?php if($pp['od_id']) { ?>
|
||||
<tr>
|
||||
<th scope="row">주문번호</th>
|
||||
<td><?php echo $pp['od_id']; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<th scope="row">결제방식</th>
|
||||
<td><?php echo $pp['pp_settle_case']; ?></td>
|
||||
</tr>
|
||||
<?php if($pp_receipt_price) { ?>
|
||||
<tr>
|
||||
<th scope="row">결제금액</th>
|
||||
<td><?php echo $pp_receipt_price; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">결제일시</th>
|
||||
<td><?php echo is_null_time($pp['pp_receipt_time']) ? $pp['pp_receipt_time'] : ''; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<?php if($pp['od_id']) { ?>
|
||||
<tr>
|
||||
<th scope="row">주문번호</th>
|
||||
<td><?php echo $pp['od_id']; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<th scope="row">결제방식</th>
|
||||
<td><?php echo $pp['pp_settle_case']; ?></td>
|
||||
</tr>
|
||||
<?php if($pp_receipt_price) { ?>
|
||||
<tr>
|
||||
<th scope="row">결제금액</th>
|
||||
<td><?php echo $pp_receipt_price; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">결제일시</th>
|
||||
<td><?php echo is_null_time($pp['pp_receipt_time']) ? $pp['pp_receipt_time'] : ''; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
// 승인번호, 휴대폰번호, KCP 거래번호
|
||||
if($app_no_subj)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row"><?php echo $app_no_subj; ?></th>
|
||||
<td><?php echo $app_no; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
// 승인번호, 휴대폰번호, KCP 거래번호
|
||||
if($app_no_subj)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row"><?php echo $app_no_subj; ?></th>
|
||||
<td><?php echo $app_no; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
// 계좌정보
|
||||
if($disp_bank)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row">입금자명</th>
|
||||
<td><?php echo $pp['pp_deposit_name']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">입금계좌</th>
|
||||
<td><?php echo $pp['pp_bank_account']; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
// 계좌정보
|
||||
if($disp_bank)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row">입금자명</th>
|
||||
<td><?php echo $pp['pp_deposit_name']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">입금계좌</th>
|
||||
<td><?php echo $pp['pp_bank_account']; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
if($disp_receipt) {
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row">영수증</th>
|
||||
<td>
|
||||
<?php
|
||||
if($pp['pp_settle_case'] == '휴대폰')
|
||||
{
|
||||
?>
|
||||
<a href="javascript:;" onclick="window.open('https://admin.kcp.co.kr/Modules/Bill/ADSA_MCASH_N_Receipt.jsp?a_trade_no=<?php echo $pp['pp_tno']; ?>', 'winreceipt', 'width=500,height=690')">영수증 출력</a>
|
||||
<?php
|
||||
}
|
||||
if($disp_receipt) {
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row">영수증</th>
|
||||
<td>
|
||||
<?php
|
||||
if($pp['pp_settle_case'] == '휴대폰')
|
||||
{
|
||||
?>
|
||||
<a href="javascript:;" onclick="window.open('https://admin.kcp.co.kr/Modules/Bill/ADSA_MCASH_N_Receipt.jsp?a_trade_no=<?php echo $pp['pp_tno']; ?>', 'winreceipt', 'width=500,height=690')">영수증 출력</a>
|
||||
<?php
|
||||
}
|
||||
|
||||
if($pp['pp_settle_case'] == '신용카드')
|
||||
{
|
||||
?>
|
||||
<a href="javascript:;" onclick="window.open('http://admin.kcp.co.kr/Modules/Sale/Card/ADSA_CARD_BILL_Receipt.jsp?c_trade_no=<?php echo $pp['pp_tno']; ?>', 'winreceipt', 'width=620,height=800')">영수증 출력</a>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
if($pp['pp_settle_case'] == '신용카드')
|
||||
{
|
||||
?>
|
||||
<a href="javascript:;" onclick="window.open('http://admin.kcp.co.kr/Modules/Sale/Card/ADSA_CARD_BILL_Receipt.jsp?c_trade_no=<?php echo $pp['pp_tno']; ?>', 'winreceipt', 'width=620,height=800')">영수증 출력</a>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
@ -104,44 +104,46 @@ $total_count = $row['cnt'];
|
||||
$ca_temp = '<a href="./list.php?ca_id='.substr($save['ca_id'],0,2).'">'.$row2['ca_name'].'</a> > ';
|
||||
}
|
||||
?>
|
||||
<table class="basic_tbl">
|
||||
<caption><?php echo $ca_temp?><a href="./list.php?ca_id=<?php echo $save['ca_id']; ?>"><?php echo $row['ca_name']; ?></a> 상품<?php echo $save['cnt']; ?>개</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">이미지</td>
|
||||
<th scope="col">상품명</th>
|
||||
<th scope="col">판매가격</td>
|
||||
<th scope="col">포인트</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $ca_temp?><a href="./list.php?ca_id=<?php echo $save['ca_id']; ?>"><?php echo $row['ca_name']; ?></a> 상품<?php echo $save['cnt']; ?>개</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">이미지</td>
|
||||
<th scope="col">상품명</th>
|
||||
<th scope="col">판매가격</td>
|
||||
<th scope="col">포인트</td>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php
|
||||
for ($i=0; $i<$save['cnt']; $i++) {
|
||||
$sql = " select it_id,
|
||||
it_name,
|
||||
it_price,
|
||||
it_tel_inq,
|
||||
it_point,
|
||||
it_type1,
|
||||
it_type2,
|
||||
it_type3,
|
||||
it_type4,
|
||||
it_type5
|
||||
from {$g5['g5_shop_item_table']} where it_id = '{$save['it_id'][$i]}' ";
|
||||
$row = sql_fetch($sql);
|
||||
<tbody>
|
||||
<?php
|
||||
for ($i=0; $i<$save['cnt']; $i++) {
|
||||
$sql = " select it_id,
|
||||
it_name,
|
||||
it_price,
|
||||
it_tel_inq,
|
||||
it_point,
|
||||
it_type1,
|
||||
it_type2,
|
||||
it_type3,
|
||||
it_type4,
|
||||
it_type5
|
||||
from {$g5['g5_shop_item_table']} where it_id = '{$save['it_id'][$i]}' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
$image = get_it_image($row['it_id'], (int)($default['de_simg_width']), (int)($default['de_simg_height']), true);
|
||||
?>
|
||||
<tr>
|
||||
<td class="ssch_it_img"><?php echo $image; ?></td>
|
||||
<td><?php echo get_text($row['it_name']); ?></td>
|
||||
<td class="ssch_num"><?php echo display_price(get_price($row), $row['it_tel_inq']); ?></td>
|
||||
<td class="ssch_num"><?php echo display_point($row['it_point']); ?></td>
|
||||
</tr>
|
||||
<?php } // for 끝 ?>
|
||||
</tbody>
|
||||
</table>
|
||||
$image = get_it_image($row['it_id'], (int)($default['de_simg_width']), (int)($default['de_simg_height']), true);
|
||||
?>
|
||||
<tr>
|
||||
<td class="ssch_it_img"><?php echo $image; ?></td>
|
||||
<td><?php echo get_text($row['it_name']); ?></td>
|
||||
<td class="ssch_num"><?php echo display_price(get_price($row), $row['it_tel_inq']); ?></td>
|
||||
<td class="ssch_num"><?php echo display_point($row['it_point']); ?></td>
|
||||
</tr>
|
||||
<?php } // for 끝 ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php } // function 끝 ?>
|
||||
|
||||
</div>
|
||||
|
||||
@ -159,7 +159,6 @@ if(!$default['de_card_test']) {
|
||||
$sql = " update {$g5['g5_shop_order_table']}
|
||||
set od_receipt_price = od_receipt_price + '$ipgm_mnyx',
|
||||
od_receipt_time = '$tx_tm',
|
||||
od_status = '입금',
|
||||
od_shop_memo = concat(od_shop_memo, \"\\n개인결제 ".$row['pp_id']." 로 결제완료 - ".$receipt_time."\")
|
||||
where od_id = '{$row['od_id']}' ";
|
||||
$result = sql_query($sql, FALSE);
|
||||
@ -168,8 +167,7 @@ if(!$default['de_card_test']) {
|
||||
// 주문서 UPDATE
|
||||
$sql = " update {$g5['g5_shop_order_table']}
|
||||
set od_receipt_price = '$ipgm_mnyx',
|
||||
od_receipt_time = '$tx_tm',
|
||||
od_status = '입금'
|
||||
od_receipt_time = '$tx_tm'
|
||||
where od_id = '$order_no'
|
||||
and od_tno = '$tno' ";
|
||||
$result = sql_query($sql, FALSE);
|
||||
@ -191,6 +189,14 @@ if(!$default['de_card_test']) {
|
||||
$sql .= " , od_status = '입금' ";
|
||||
$sql .= " where od_id = '$od_id' ";
|
||||
sql_query($sql, FALSE);
|
||||
|
||||
// 장바구니 상태변경
|
||||
if($info['od_misu'] == 0) {
|
||||
$sql = " update {$g5['g5_shop_cart_table']}
|
||||
set ct_status = '입금'
|
||||
where od_id = '$od_id' ";
|
||||
sql_query($sql, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
|
||||
@ -137,34 +137,36 @@ $amt_tax = (int)($amt_tot - $amt_sup);
|
||||
<section>
|
||||
<h2>주문정보</h2>
|
||||
|
||||
<table class="basic_tbl">
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">주문 번호</th>
|
||||
<td><?php echo $od['od_id']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">상품 정보</th>
|
||||
<td><?php echo $goods_name; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">주문자 이름</th>
|
||||
<td><?php echo $od['od_name']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">주문자 E-Mail</th>
|
||||
<td><?php echo $od['od_email']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">주문자 전화번호</th>
|
||||
<td><?php echo $od['od_tel']; ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">주문 번호</th>
|
||||
<td><?php echo $od['od_id']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">상품 정보</th>
|
||||
<td><?php echo $goods_name; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">주문자 이름</th>
|
||||
<td><?php echo $od['od_name']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">주문자 E-Mail</th>
|
||||
<td><?php echo $od['od_email']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">주문자 전화번호</th>
|
||||
<td><?php echo $od['od_tel']; ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
@ -184,52 +186,54 @@ $amt_tax = (int)($amt_tot - $amt_sup);
|
||||
<input type="hidden" name="amt_svc">
|
||||
<input type="hidden" name="amt_tax">
|
||||
|
||||
<table class="basic_tbl">
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">원 거래 시각</th>
|
||||
<td><?php echo $trad_time; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">발행 용도</th>
|
||||
<td>
|
||||
<input type="radio" name="tr_code" value="0" onClick="jsf__chk_tr_code( this.form )" checked>소득공제용
|
||||
<input type="radio" name="tr_code" value="1" onClick="jsf__chk_tr_code( this.form )">지출증빙용
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<label for="id_info">
|
||||
<span id="span_tr_code_0" style="display:inline">주민(휴대폰)번호</span>
|
||||
<span id="span_tr_code_1" style="display:none">사업자번호</span>
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input type="text" name="id_info" id="id_info" class="frm_input" size="16" maxlength="13"> ("-" 생략)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">거래금액 총합</th>
|
||||
<td><?php echo number_format($amt_tot); ?>원</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">공급가액</th>
|
||||
<td><?php echo number_format($amt_sup); ?>원<!-- ((거래금액 총합 * 10) / 11) --></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">봉사료</th>
|
||||
<td><?php echo number_format($amt_svc); ?>원</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">부가가치세</th>
|
||||
<td><?php echo number_format($amt_tax); ?>원<!-- 거래금액 총합 - 공급가액 - 봉사료 --></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">원 거래 시각</th>
|
||||
<td><?php echo $trad_time; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">발행 용도</th>
|
||||
<td>
|
||||
<input type="radio" name="tr_code" value="0" onClick="jsf__chk_tr_code( this.form )" checked>소득공제용
|
||||
<input type="radio" name="tr_code" value="1" onClick="jsf__chk_tr_code( this.form )">지출증빙용
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<label for="id_info">
|
||||
<span id="span_tr_code_0" style="display:inline">주민(휴대폰)번호</span>
|
||||
<span id="span_tr_code_1" style="display:none">사업자번호</span>
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input type="text" name="id_info" id="id_info" class="frm_input" size="16" maxlength="13"> ("-" 생략)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">거래금액 총합</th>
|
||||
<td><?php echo number_format($amt_tot); ?>원</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">공급가액</th>
|
||||
<td><?php echo number_format($amt_sup); ?>원<!-- ((거래금액 총합 * 10) / 11) --></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">봉사료</th>
|
||||
<td><?php echo number_format($amt_svc); ?>원</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">부가가치세</th>
|
||||
<td><?php echo number_format($amt_tax); ?>원<!-- 거래금액 총합 - 공급가액 - 봉사료 --></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="scash_apply">
|
||||
<span id="show_pay_btn">
|
||||
|
||||
@ -21,68 +21,71 @@ include_once('./_head.php');
|
||||
<input type="hidden" name="sw_direct" value="">
|
||||
<input type="hidden" name="prog" value="wish">
|
||||
|
||||
<table class="basic_tbl">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">선택</th>
|
||||
<th scope="col">이미지</th>
|
||||
<th scope="col">상품명</th>
|
||||
<th scope="col">보관일시</th>
|
||||
<th scope="col">삭제</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$sql = " select a.wi_id, a.wi_time, b.* from {$g5['g5_shop_wish_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id ) ";
|
||||
$sql .= " where a.mb_id = '{$member['mb_id']}' order by a.wi_id desc ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row = mysql_fetch_array($result); $i++) {
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">선택</th>
|
||||
<th scope="col">이미지</th>
|
||||
<th scope="col">상품명</th>
|
||||
<th scope="col">보관일시</th>
|
||||
<th scope="col">삭제</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$sql = " select a.wi_id, a.wi_time, b.* from {$g5['g5_shop_wish_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id ) ";
|
||||
$sql .= " where a.mb_id = '{$member['mb_id']}' order by a.wi_id desc ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row = mysql_fetch_array($result); $i++) {
|
||||
|
||||
$out_cd = '';
|
||||
$sql = " select count(*) as cnt from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' ";
|
||||
$tmp = sql_fetch($sql);
|
||||
if($tmp['cnt'])
|
||||
$out_cd = 'no';
|
||||
$out_cd = '';
|
||||
$sql = " select count(*) as cnt from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' ";
|
||||
$tmp = sql_fetch($sql);
|
||||
if($tmp['cnt'])
|
||||
$out_cd = 'no';
|
||||
|
||||
$it_price = get_price($row);
|
||||
$it_price = get_price($row);
|
||||
|
||||
if ($row['it_tel_inq']) $out_cd = 'tel_inq';
|
||||
if ($row['it_tel_inq']) $out_cd = 'tel_inq';
|
||||
|
||||
$image = get_it_image($row['it_id'], 70, 70);
|
||||
$it_point = get_item_point($row);
|
||||
?>
|
||||
$image = get_it_image($row['it_id'], 70, 70);
|
||||
$it_point = get_item_point($row);
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td class="td_chk">
|
||||
<?php
|
||||
// 품절검사
|
||||
$it_stock_qty = get_it_stock_qty($row['it_id']);
|
||||
if($it_stock_qty <= 0)
|
||||
{
|
||||
?>
|
||||
품절
|
||||
<?php } else { //품절이 아니면 체크할수 있도록한다 ?>
|
||||
<input type="checkbox" name="chk_it_id[<?php echo $i; ?>]" value="1" onclick="out_cd_check(this, '<?php echo $out_cd; ?>');">
|
||||
<?php } ?>
|
||||
<input type="hidden" name="it_id[<?php echo $i; ?>]" value="<?php echo $row['it_id']; ?>">
|
||||
<input type="hidden" name="io_type[<?php echo $row['it_id']; ?>][0]" value="0">
|
||||
<input type="hidden" name="io_id[<?php echo $row['it_id']; ?>][0]" value="">
|
||||
<input type="hidden" name="io_value[<?php echo $row['it_id']; ?>][0]" value="<?php echo $row['it_name']; ?>">
|
||||
<input type="hidden" name="ct_qty[<?php echo $row['it_id']; ?>][0]" value="1">
|
||||
</td>
|
||||
<td class="sod_ws_img"><?php echo $image; ?></td>
|
||||
<td><a href="./item.php?it_id=<?php echo $row['it_id']; ?>"><?php echo stripslashes($row['it_name']); ?></a></td>
|
||||
<td class="td_datetime"><?php echo $row['wi_time']; ?></td>
|
||||
<td class="td_smallmng"><a href="./wishupdate.php?w=d&wi_id=<?php echo $row['wi_id']; ?>">삭제</a></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
<tr>
|
||||
<td class="td_chk">
|
||||
<?php
|
||||
// 품절검사
|
||||
$it_stock_qty = get_it_stock_qty($row['it_id']);
|
||||
if($it_stock_qty <= 0)
|
||||
{
|
||||
?>
|
||||
품절
|
||||
<?php } else { //품절이 아니면 체크할수 있도록한다 ?>
|
||||
<input type="checkbox" name="chk_it_id[<?php echo $i; ?>]" value="1" onclick="out_cd_check(this, '<?php echo $out_cd; ?>');">
|
||||
<?php } ?>
|
||||
<input type="hidden" name="it_id[<?php echo $i; ?>]" value="<?php echo $row['it_id']; ?>">
|
||||
<input type="hidden" name="io_type[<?php echo $row['it_id']; ?>][0]" value="0">
|
||||
<input type="hidden" name="io_id[<?php echo $row['it_id']; ?>][0]" value="">
|
||||
<input type="hidden" name="io_value[<?php echo $row['it_id']; ?>][0]" value="<?php echo $row['it_name']; ?>">
|
||||
<input type="hidden" name="ct_qty[<?php echo $row['it_id']; ?>][0]" value="1">
|
||||
</td>
|
||||
<td class="sod_ws_img"><?php echo $image; ?></td>
|
||||
<td><a href="./item.php?it_id=<?php echo $row['it_id']; ?>"><?php echo stripslashes($row['it_name']); ?></a></td>
|
||||
<td class="td_datetime"><?php echo $row['wi_time']; ?></td>
|
||||
<td class="td_mngsmall"><a href="./wishupdate.php?w=d&wi_id=<?php echo $row['wi_id']; ?>">삭제</a></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($i == 0)
|
||||
echo '<tr><td colspan="5" class="empty_table">보관함이 비었습니다.</td></tr>';
|
||||
?>
|
||||
</tr>
|
||||
</table>
|
||||
if ($i == 0)
|
||||
echo '<tr><td colspan="5" class="empty_table">보관함이 비었습니다.</td></tr>';
|
||||
?>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="sod_ws_act">
|
||||
<button type="submit" class="btn01" onclick="return fwishlist_check(document.fwishlist,'');">장바구니 담기</button>
|
||||
|
||||
Reference in New Issue
Block a user