영카트 5.4 버전 내용 적용

This commit is contained in:
thisgun
2019-12-02 10:29:31 +09:00
parent 8517e1e31e
commit 9b0078350d
840 changed files with 36442 additions and 28088 deletions

344
shop/ajax.action.php Normal file
View File

@ -0,0 +1,344 @@
<?php
include_once('./_common.php');
$action = isset($_REQUEST['action']) ? preg_replace('/[^a-z0-9_]/i', '', $_REQUEST['action']) : '';
switch ($action) {
case 'refresh_cart' :
// 보관기간이 지난 상품 삭제
cart_item_clean();
$s_cart_id = preg_replace('/[^a-z0-9_\-]/i', '', get_session('ss_cart_id'));
// 선택필드 초기화
if( $s_cart_id ){
$sql = " update {$g5['g5_shop_cart_table']} set ct_select = '0' where od_id = '$s_cart_id' ";
sql_query($sql);
}
include_once(G5_SHOP_SKIN_PATH.'/boxcart.skin.php'); // 장바구니
break;
case 'refresh_wish' :
if( !$is_member ){
die('');
}
include_once(G5_SHOP_SKIN_PATH.'/boxwish.skin.php'); // 위시리스트
break;
case 'cart_delete' :
// 보관기간이 지난 상품 삭제
cart_item_clean();
$s_cart_id = get_session('ss_cart_id');
// 장바구니 상품삭제
$sql = " delete from {$g5['g5_shop_cart_table']}
where od_id = '".$s_cart_id."'
and it_id = '{$it_id}' ";
sql_query($sql);
die(json_encode(array('error' => '')));
break;
case 'cart_update' :
// 보관기간이 지난 상품 삭제
cart_item_clean();
// cart id 설정
set_cart_id($sw_direct);
if($sw_direct)
$tmp_cart_id = get_session('ss_cart_direct');
else
$tmp_cart_id = get_session('ss_cart_id');
// 브라우저에서 쿠키를 허용하지 않은 경우라고 볼 수 있음.
if (!$tmp_cart_id)
{
die(json_encode(array('error' => '더 이상 작업을 진행할 수 없습니다.\n\n브라우저의 쿠키 허용을 사용하지 않음으로 설정한것 같습니다.\n\n브라우저의 인터넷 옵션에서 쿠키 허용을 사용으로 설정해 주십시오.\n\n그래도 진행이 되지 않는다면 쇼핑몰 운영자에게 문의 바랍니다.')));
}
$tmp_cart_id = preg_replace('/[^a-z0-9_\-]/i', '', $tmp_cart_id);
// 레벨(권한)이 상품구입 권한보다 작다면 상품을 구입할 수 없음.
if ($member['mb_level'] < $default['de_level_sell'])
{
die(json_encode(array('error' => '상품을 구입할 수 있는 권한이 없습니다.')));
}
$count = count($_POST['it_id']);
if ($count < 1)
die(json_encode(array('error' => '장바구니에 담을 상품을 선택하여 주십시오.')));
$ct_count = 0;
for($i=0; $i<$count; $i++) {
$it_id = $_POST['it_id'][$i];
$opt_count = count($_POST['io_id'][$it_id]);
// 상품정보
$it = get_shop_item($it_id, false);
if(!$it['it_id'])
die(json_encode(array('error' => '상품정보가 존재하지 않습니다.')));
// 옵션정보를 얻어서 배열에 저장
$opt_list = array();
$sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '$it_id' order by io_no asc ";
$result = sql_query($sql);
$lst_count = 0;
for($k=0; $row=sql_fetch_array($result); $k++) {
$opt_list[$row['io_type']][$row['io_id']]['id'] = $row['io_id'];
$opt_list[$row['io_type']][$row['io_id']]['use'] = $row['io_use'];
$opt_list[$row['io_type']][$row['io_id']]['price'] = $row['io_price'];
$opt_list[$row['io_type']][$row['io_id']]['stock'] = $row['io_stock_qty'];
// 선택옵션 개수
if(!$row['io_type'])
$lst_count++;
}
if($lst_count > 0 && !trim($_POST['io_id'][$it_id][$i]) && $_POST['io_type'][$it_id][$i] == 0)
die(json_encode(array('error' => '상품의 선택옵션을 선택해 주십시오.')));
for($k=0; $k<$opt_count; $k++) {
if ($_POST['ct_qty'][$it_id][$k] < 1)
die(json_encode(array('error' => '수량은 1 이상 입력해 주십시오.')));
}
// 바로구매에 있던 장바구니 자료를 지운다.
if($i == 0 && $sw_direct)
sql_query(" delete from {$g5['g5_shop_cart_table']} where od_id = '$tmp_cart_id' and ct_direct = 1 ", false);
// 최소, 최대 수량 체크
if($it['it_buy_min_qty'] || $it['it_buy_max_qty']) {
$sum_qty = 0;
for($k=0; $k<$opt_count; $k++) {
if($_POST['io_type'][$it_id][$k] == 0)
$sum_qty += $_POST['ct_qty'][$it_id][$k];
}
if($it['it_buy_min_qty'] > 0 && $sum_qty < $it['it_buy_min_qty'])
die(json_encode(array('error' => $it['it_name'].'의 선택옵션 개수 총합 '.number_format($it['it_buy_min_qty']).'개 이상 주문해 주십시오.')));
if($it['it_buy_max_qty'] > 0 && $sum_qty > $it['it_buy_max_qty'])
die(json_encode(array('error' => $it['it_name'].'의 선택옵션 개수 총합 '.number_format($it['it_buy_max_qty']).'개 이하로 주문해 주십시오.')));
// 기존에 장바구니에 담긴 상품이 있는 경우에 최대 구매수량 체크
if($it['it_buy_max_qty'] > 0) {
$sql4 = " select sum(ct_qty) as ct_sum
from {$g5['g5_shop_cart_table']}
where od_id = '$tmp_cart_id'
and it_id = '$it_id'
and io_type = '0'
and ct_status = '쇼핑' ";
$row4 = sql_fetch($sql4);
if(($sum_qty + $row4['ct_sum']) > $it['it_buy_max_qty'])
die(json_encode(array('error' => $it['it_name'].'의 선택옵션 개수 총합 '.number_format($it['it_buy_max_qty']).'개 이하로 주문해 주십시오.', './cart.php')));
}
}
// 장바구니에 Insert
// 바로구매일 경우 장바구니가 체크된것으로 강제 설정
$ct_select = 0;
$ct_select_time = '0000-00-00 00:00:00';
// 장바구니에 Insert
$comma = '';
$sql = " INSERT INTO {$g5['g5_shop_cart_table']}
( od_id, mb_id, it_id, it_name, it_sc_type, it_sc_method, it_sc_price, it_sc_minimum, it_sc_qty, ct_status, ct_price, ct_point, ct_point_use, ct_stock_use, ct_option, ct_qty, ct_notax, io_id, io_type, io_price, ct_time, ct_ip, ct_send_cost, ct_direct, ct_select, ct_select_time )
VALUES ";
for($k=0; $k<$opt_count; $k++) {
$io_id = preg_replace(G5_OPTION_ID_FILTER, '', $_POST['io_id'][$it_id][$k]);
$io_type = preg_replace('#[^01]#', '', $_POST['io_type'][$it_id][$k]);
$io_value = $_POST['io_value'][$it_id][$k];
// 선택옵션정보가 존재하는데 선택된 옵션이 없으면 건너뜀
if($lst_count && $io_id == '')
continue;
// 구매할 수 없는 옵션은 건너뜀
if($io_id && !$opt_list[$io_type][$io_id]['use'])
continue;
$io_price = $opt_list[$io_type][$io_id]['price'];
$ct_qty = (int) $_POST['ct_qty'][$it_id][$k];
// 구매가격이 음수인지 체크
if($io_type) {
if((int)$io_price < 0)
die(json_encode(array('error' => '구매금액이 음수인 상품은 구매할 수 없습니다.')));
} else {
if((int)$it['it_price'] + (int)$io_price < 0)
die(json_encode(array('error' => '구매금액이 음수인 상품은 구매할 수 없습니다.')));
}
// 동일옵션의 상품이 있으면 수량 더함
$sql2 = " select ct_id, io_type, ct_qty
from {$g5['g5_shop_cart_table']}
where od_id = '$tmp_cart_id'
and it_id = '$it_id'
and io_id = '$io_id'
and ct_status = '쇼핑' ";
$row2 = sql_fetch($sql2);
if($row2['ct_id']) {
// 재고체크
$tmp_ct_qty = $row2['ct_qty'];
if(!$io_id)
$tmp_it_stock_qty = get_it_stock_qty($it_id);
else
$tmp_it_stock_qty = get_option_stock_qty($it_id, $io_id, $row2['io_type']);
if ($tmp_ct_qty + $ct_qty > $tmp_it_stock_qty)
{
die(json_encode(array('error' => $io_value." 의 재고수량이 부족합니다.\n\n현재 재고수량 : " . number_format($tmp_it_stock_qty) . "")));
}
$sql3 = " update {$g5['g5_shop_cart_table']}
set ct_qty = ct_qty + '$ct_qty'
where ct_id = '{$row2['ct_id']}' ";
sql_query($sql3);
continue;
}
// 포인트
$point = 0;
if($config['cf_use_point']) {
if($io_type == 0) {
$point = get_item_point($it, $io_id);
} else {
$point = $it['it_supply_point'];
}
if($point < 0)
$point = 0;
}
// 배송비결제
if($it['it_sc_type'] == 1)
$ct_send_cost = 2; // 무료
else if($it['it_sc_type'] > 1 && $it['it_sc_method'] == 1)
$ct_send_cost = 1; // 착불
$io_value = sql_real_escape_string(strip_tags($io_value));
$sql .= $comma."( '$tmp_cart_id', '{$member['mb_id']}', '{$it['it_id']}', '".addslashes($it['it_name'])."', '{$it['it_sc_type']}', '{$it['it_sc_method']}', '{$it['it_sc_price']}', '{$it['it_sc_minimum']}', '{$it['it_sc_qty']}', '쇼핑', '{$it['it_price']}', '$point', '0', '0', '$io_value', '$ct_qty', '{$it['it_notax']}', '$io_id', '$io_type', '$io_price', '".G5_TIME_YMDHIS."', '".$_SERVER['REMOTE_ADDR']."', '$ct_send_cost', '$sw_direct', '$ct_select', '$ct_select_time' )";
$comma = ' , ';
$ct_count++;
}
if($ct_count > 0)
sql_query($sql);
}
die(json_encode(array('error' => '')));
break;
case 'get_item_option' :
$it = get_shop_item($it_id, true);
if(!$it['it_id'])
die(json_encode(array('error' => '상품정보가 존재하지 않습니다.')));
// 상품품절체크
$is_soldout = is_soldout($it['it_id']);
// 주문가능체크
$is_orderable = true;
if(!$it['it_use'] || $it['it_tel_inq'] || $is_soldout)
die(json_encode(array('error' => '상품을 구매할 수 없습니다.')));
$item_ct_qty = 1;
if($it['it_buy_min_qty'] > 1)
$item_ct_qty = $it['it_buy_min_qty'];
$action_url = G5_SHOP_URL.'/ajax.action.php';
$is_option = 0;
$option_item = get_shop_item_options($it['it_id'], $it['it_option_subject'], 0);
ob_start();
?>
<div class="sct_cartop_wr">
<form name="fcart" method="post" action="<?php echo $action_url; ?>">
<input type="hidden" name="action" value="cart_update">
<input type="hidden" name="it_id[]" value="<?php echo $it['it_id']; ?>">
<input type="hidden" name="it_name[]" value="<?php echo stripslashes($it['it_name']); ?>">
<input type="hidden" name="it_price[]" value="<?php echo get_price($it); ?>">
<input type="hidden" name="it_stock[]" value="<?php echo get_it_stock_qty($it['it_id']); ?>">
<input type="hidden" name="io_type[<?php echo $it['it_id']; ?>][]" value="0">
<input type="hidden" name="io_id[<?php echo $it['it_id']; ?>][]" value="">
<input type="hidden" name="io_value[<?php echo $it['it_id']; ?>][]" value="">
<input type="hidden" name="io_price[<?php echo $it['it_id']; ?>][]" value="">
<input type="hidden" name="ct_qty[<?php echo $it['it_id']; ?>][]" value="<?php echo $item_ct_qty; ?>">
<input type="hidden" name="sw_direct" value="0">
<?php
if($option_item) {
$is_option = 1;
?>
<?php // 선택옵션
echo $option_item;
?>
<button type="button" class="cartopt_cart_btn">장바구니 담기</button>
<button type="button" class="cartopt_close_btn">닫기</button>
<?php } ?>
</form>
</div>
<?php
$content = ob_get_contents();
ob_end_clean();
$result = array(
'error' => '',
'option' => $is_option,
'html' => $content
);
die(json_encode($result));
break;
case 'wish_update' :
if (!$is_member)
die('회원 전용 서비스 입니다.');
if(!$it_id)
die('상품 코드가 올바르지 않습니다.');
// 상품정보 체크
$row = get_shop_item($it_id, true);
if(!$row['it_id'])
die('상품정보가 존재하지 않습니다.');
$sql = " select wi_id from {$g5['g5_shop_wish_table']}
where mb_id = '{$member['mb_id']}' and it_id = '$it_id' ";
$row = sql_fetch($sql);
if (!$row['wi_id']) {
$sql = " insert {$g5['g5_shop_wish_table']}
set mb_id = '{$member['mb_id']}',
it_id = '$it_id',
wi_time = '".G5_TIME_YMDHIS."',
wi_ip = '".$_SERVER['REMOTE_ADDR']."' ";
sql_query($sql);
die('OK');
} else {
die('위시리스트에 이미 등록된 상품입니다.');
}
break;
default :
}
?>

View File

@ -45,9 +45,9 @@ include_once('./_head.php');
<table>
<thead>
<tr>
<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 scope="col" class="chk_box">
<input type="checkbox" name="ct_all" value="1" id="ct_all" checked="checked" class="selec_chk">
<label for="ct_all"><span></span><b class="sound_only">상품 전체</b></label>
</th>
<th scope="col">상품명</th>
<th scope="col">총수량</th>
@ -98,7 +98,7 @@ include_once('./_head.php');
$continue_ca_id = $row['ca_id'];
}
$a1 = '<a href="./item.php?it_id='.$row['it_id'].'" class="prd_name"><b>';
$a1 = '<a href="'.shop_item_url($row['it_id']).'" class="prd_name"><b>';
$a2 = '</b></a>';
$image = get_it_image($row['it_id'], 80, 80);
@ -136,25 +136,24 @@ include_once('./_head.php');
?>
<tr>
<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 class="td_chk chk_box">
<input type="checkbox" name="ct_chk[<?php echo $i; ?>]" value="1" id="ct_chk_<?php echo $i; ?>" checked="checked" class="selec_chk">
<label for="ct_chk_<?php echo $i; ?>"><span></span><b class="sound_only">상품</b></label>
</td>
<td class="td_prd">
<div class="sod_img"><a href="./item.php?it_id=<?php echo $row['it_id']; ?>"><?php echo $image; ?></a></div>
<td class="td_prd">
<div class="sod_img"><a href="<?php echo shop_item_url($row['it_id']); ?>"><?php echo $image; ?></a></div>
<div class="sod_name">
<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_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; ?>
</div>
</td>
<td class="td_num"><?php echo number_format($sum['qty']); ?></td>
<td class="td_numbig text_right"><?php echo number_format($row['ct_price']); ?></td>
<td class="td_numbig text_right"><?php echo number_format($point); ?></td>
<td class="td_numbig"><?php echo number_format($row['ct_price']); ?></td>
<td class="td_numbig"><?php echo number_format($point); ?></td>
<td class="td_dvr"><?php echo $ct_send_cost; ?></td>
<td class="td_numbig text_right"><span id="sell_price_<?php echo $i; ?>" class="total_prc"><?php echo number_format($sell_price); ?></span></td>
</tr>
<?php
@ -163,7 +162,7 @@ include_once('./_head.php');
} // for 끝
if ($i == 0) {
echo '<tr><td colspan="8" class="empty_table">장바구니에 담긴 상품이 없습니다.</td></tr>';
echo '<tr><td colspan="7" class="empty_table">장바구니에 담긴 상품이 없습니다.</td></tr>';
} else {
// 배송비 계산
$send_cost = get_sendcost($s_cart_id, 0);
@ -197,7 +196,6 @@ include_once('./_head.php');
<span>총계 가격</span>
<strong><?php echo number_format($tot_price); ?></strong> 원
</li>
</ul>
</div>
<?php } ?>
@ -209,17 +207,15 @@ include_once('./_head.php');
<input type="hidden" name="url" value="./orderform.php">
<input type="hidden" name="records" value="<?php echo $i; ?>">
<input type="hidden" name="act" value="">
<a href="<?php echo G5_SHOP_URL; ?>/list.php?ca_id=<?php echo $continue_ca_id; ?>" class="btn01">쇼핑 계속하기</a>
<button type="button" onclick="return form_check('buy');" class="btn_submit"><i class="fa fa-credit-card" aria-hidden="true"></i> 주문하기</button>
<a href="<?php echo shop_category_url($continue_ca_id); ?>" class="btn01">쇼핑 계속하기</a>
<button type="button" onclick="return form_check('buy');" class="btn_submit">주문하기</button>
<?php if ($naverpay_button_js) { ?>
<div class="cart-naverpay"><?php echo $naverpay_request_js.$naverpay_button_js; ?></div>
<?php } ?>
<?php } ?>
</div>
</form>
</div>
<script>
@ -237,7 +233,7 @@ $(function() {
{ it_id: it_id },
function(data) {
$("#mod_option_frm").remove();
$this.after("<div id=\"mod_option_frm\"></div>");
$this.after("<div id=\"mod_option_frm\"></div><div class=\"mod_option_bg\"></div>");
$("#mod_option_frm").html(data);
price_calculate();
}
@ -254,7 +250,7 @@ $(function() {
// 옵션수정 닫기
$(document).on("click", "#mod_option_close", function() {
$("#mod_option_frm").remove();
$("#mod_option_frm, .mod_option_bg").remove();
$(".mod_options").eq(close_btn_idx).focus();
});
$("#win_mask").click(function () {

View File

@ -75,6 +75,7 @@ if($option_2) {
?>
<div id="sit_sel_option">
<h3>선택옵션</h3>
<ul id="sit_opt_added">
<?php
for($i=0; $row=sql_fetch_array($result); $i++) {
@ -120,7 +121,7 @@ if($option_2) {
<div id="sit_tot_price"></div>
<div class="btn_confirm">
<input type="submit" value="선택사항적용" class="btn_submit">
<button type="submit" class="btn_submit">확인</button>
<button type="button" id="mod_option_close" class="btn_close"><i class="fa fa-times" aria-hidden="true"></i><span class="sound_only">닫기</span></button>
</div>
</form>

View File

@ -152,8 +152,7 @@ else // 장바구니에 담기
}
// 상품정보
$sql = " select * from {$g5['g5_shop_item_table']} where it_id = '$it_id' ";
$it = sql_fetch($sql);
$it = get_shop_item($it_id, false);
if(!$it['it_id'])
alert('상품정보가 존재하지 않습니다.');

View File

@ -19,14 +19,13 @@ function get_mshop_category($ca_id, $len)
<div class="ct_wr">
<?php
$mshop_ca_href = G5_SHOP_URL.'/list.php?ca_id=';
$mshop_ca_res1 = sql_query(get_mshop_category('', 2));
for($i=0; $mshop_ca_row1=sql_fetch_array($mshop_ca_res1); $i++) {
if($i == 0)
echo '<ul class="cate">'.PHP_EOL;
?>
<li class="cate_li_1">
<a href="<?php echo $mshop_ca_href.$mshop_ca_row1['ca_id']; ?>" class="cate_li_1_a"><?php echo get_text($mshop_ca_row1['ca_name']); ?></a>
<a href="<?php echo shop_category_url($mshop_ca_row1['ca_id']); ?>" class="cate_li_1_a"><?php echo get_text($mshop_ca_row1['ca_name']); ?></a>
<?php
$mshop_ca_res2 = sql_query(get_mshop_category($mshop_ca_row1['ca_id'], 4));
@ -35,7 +34,7 @@ function get_mshop_category($ca_id, $len)
echo '<ul class="sub_cate sub_cate1">'.PHP_EOL;
?>
<li class="cate_li_2">
<a href="<?php echo $mshop_ca_href.$mshop_ca_row2['ca_id']; ?>"><?php echo get_text($mshop_ca_row2['ca_name']); ?></a>
<a href="<?php echo shop_category_url($mshop_ca_row2['ca_id']); ?>"><?php echo get_text($mshop_ca_row2['ca_name']); ?></a>
</li>
<?php
}

View File

@ -33,56 +33,51 @@ $result = sql_query($sql);
<!-- 쿠폰 내역 시작 { -->
<div id="coupon" class="new_win">
<h1 id="win_title"><i class="fa fa-newspaper-o" aria-hidden="true"></i> <?php echo $g5['title'] ?></h1>
<h1 id="win_title"><?php echo $g5['title'] ?></h1>
<ul>
<?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="new_win_con list_01">
<ul>
<?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_type'])
$cp_price = $row['cp_price'].'%';
else
$cp_price = number_format($row['cp_price']).'원';
$cp_count++;
?>
<li>
<div>
<span class="cou_tit"><?php echo $row['cp_subject']; ?></span>
<span class="cou_pri"><?php echo $cp_price; ?></span>
</div>
<div>
<span class="cou_target"><?php echo $cp_target; ?></span>
<span class="cou_date"><i class="fa fa-clock-o" aria-hidden="true"></i> <?php echo substr($row['cp_start'], 2, 8); ?> ~ <?php echo substr($row['cp_end'], 2, 8); ?></span>
</div>
</li>
<?php
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 {
$it = get_shop_item($row['cp_target'], true);
$cp_target = $it['it_name'].' 상품할인';
}
if(!$cp_count)
echo '<li class="empty_li">사용할 수 있는 쿠폰이 없습니다.</li>';
?>
</ul>
</div>
if($row['cp_type'])
$cp_price = $row['cp_price'].'%';
else
$cp_price = number_format($row['cp_price']).'원';
$cp_count++;
?>
<li>
<div class="cou_top">
<span class="cou_tit"><?php echo $row['cp_subject']; ?></span>
<span class="cou_pri"><?php echo $cp_price; ?></span>
</div>
<div>
<span class="cou_target"><?php echo $cp_target; ?> <i class="fa fa-angle-right" aria-hidden="true"></i></span>
<span class="cou_date"><i class="fa fa-clock-o" aria-hidden="true"></i> <?php echo substr($row['cp_start'], 2, 8); ?> ~ <?php echo substr($row['cp_end'], 2, 8); ?></span>
</div>
</li>
<?php
}
if(!$cp_count)
echo '<li class="empty_li">사용할 수 있는 쿠폰이 없습니다.</li>';
?>
</ul>
<button type="button" onclick="window.close();" class="btn_close">창닫기</button>
</div>

View File

@ -13,7 +13,7 @@ $g5['title'] = '쿠폰존';
include_once(G5_SHOP_PATH.'/_head.php');
if (!G5_IS_MOBILE && $is_admin)
echo '<div class="sct_admin"><a href="'.G5_ADMIN_URL.'/shop_admin/couponzonelist.php" class="btn_admin">쿠폰존 관리</a></div>';
echo '<div class="sct_admin"><a href="'.G5_ADMIN_URL.'/shop_admin/couponzonelist.php" class="btn_admin btn"><span class="sound_only">쿠폰존 관리</span><i class="fa fa-cog fa-spin fa-fw"></i></a></div>';
if(G5_IS_MOBILE) {
define('G5_SHOP_CSS_URL', G5_MSHOP_SKIN_URL);

View File

@ -24,7 +24,7 @@ $g5['title'] = $ev['ev_subject'];
include_once('./_head.php');
if ($is_admin)
echo '<div class="sev_admin"><a href="'.G5_ADMIN_URL.'/shop_admin/itemeventform.php?w=u&amp;ev_id='.$ev['ev_id'].'" class="btn_admin">이벤트 관리</a></div>';
echo '<div class="sev_admin"><a href="'.G5_ADMIN_URL.'/shop_admin/itemeventform.php?w=u&amp;ev_id='.$ev['ev_id'].'" class="btn_admin btn"><span class="sound_only">이벤트 관리</span><i class="fa fa-cog fa-spin fa-fw"></i></a></div>';
?>
<script>

View File

@ -24,9 +24,9 @@ include_once(G5_SHOP_PATH.'/shop.head.php');
<?php if($default['de_type1_list_use']) { ?>
<!-- 히트상품 시작 { -->
<section class="sct_wrap">
<section id="idx_hit" class="sct_wrap">
<header>
<h2><a href="<?php echo G5_SHOP_URL; ?>/listtype.php?type=1">히트상품</a></h2>
<h2><a href="<?php echo shop_type_url('1'); ?>">히트상품</a></h2>
</header>
<?php
$list = new item_list();
@ -39,41 +39,32 @@ include_once(G5_SHOP_PATH.'/shop.head.php');
$list->set_view('it_price', true);
$list->set_view('it_icon', true);
$list->set_view('sns', true);
$list->set_view('star', true);
echo $list->run();
?>
</section>
<!-- } 히트상품 끝 -->
<script>
//히트상품
$(function(){
$('#idx_hit .smt_40').owlCarousel({
loop:true,
nav:true,
autoplay:true,
autoplayHoverPause:true,
responsive:{
1000:{items:5}
}
})
});
</script>
<?php } ?>
<?php if($default['de_type2_list_use']) { ?>
<!-- 추천상품 시작 { -->
<section class="sct_wrap">
<header>
<h2><a href="<?php echo G5_SHOP_URL; ?>/listtype.php?type=2">추천상품</a></h2>
</header>
<?php
$list = new item_list();
$list->set_type(2);
$list->set_view('it_id', false);
$list->set_view('it_name', true);
$list->set_view('it_basic', true);
$list->set_view('it_cust_price', true);
$list->set_view('it_price', true);
$list->set_view('it_icon', true);
$list->set_view('sns', true);
echo $list->run();
?>
</section>
<!-- } 추천상품 끝 -->
<?php } ?>
<?php include_once(G5_SHOP_SKIN_PATH.'/boxevent.skin.php'); // 이벤트 ?>
<?php if($default['de_type3_list_use']) { ?>
<!-- 최신상품 시작 { -->
<section class="sct_wrap">
<header>
<h2><a href="<?php echo G5_SHOP_URL; ?>/listtype.php?type=3">최신상품</a></h2>
<h2><a href="<?php echo shop_type_url('3'); ?>">최신상품</a></h2>
</header>
<?php
$list = new item_list();
@ -85,17 +76,43 @@ include_once(G5_SHOP_PATH.'/shop.head.php');
$list->set_view('it_price', true);
$list->set_view('it_icon', true);
$list->set_view('sns', true);
$list->set_view('star', true);
echo $list->run();
?>
</section>
<!-- } 최신상품 끝 -->
<?php } ?>
<?php if($default['de_type2_list_use']) { ?>
<!-- 추천상품 시작 { -->
<section class="sct_wrap">
<header>
<h2><a href="<?php echo shop_type_url('2'); ?>">추천상품</a></h2>
</header>
<?php
$list = new item_list();
$list->set_type(2);
$list->set_view('it_id', false);
$list->set_view('it_name', true);
$list->set_view('it_basic', true);
$list->set_view('it_cust_price', true);
$list->set_view('it_price', true);
$list->set_view('it_icon', true);
$list->set_view('sns', true);
$list->set_view('star', true);
echo $list->run();
?>
</section>
<!-- } 추천상품 끝 -->
<?php } ?>
<?php include_once(G5_SHOP_SKIN_PATH.'/boxevent.skin.php'); // 이벤트 ?>
<?php if($default['de_type5_list_use']) { ?>
<!-- 할인상품 시작 { -->
<section class="sct_wrap">
<header>
<h2><a href="<?php echo G5_SHOP_URL; ?>/listtype.php?type=5">할인상품</a></h2>
<h2><a href="<?php echo shop_type_url('5'); ?>">할인상품</a></h2>
</header>
<?php
$list = new item_list();
@ -107,6 +124,7 @@ include_once(G5_SHOP_PATH.'/shop.head.php');
$list->set_view('it_price', true);
$list->set_view('it_icon', true);
$list->set_view('sns', true);
$list->set_view('star', true);
echo $list->run();
?>
</section>

View File

@ -7,12 +7,15 @@ if (G5_IS_MOBILE) {
}
$it_id = get_search_string(trim($_GET['it_id']));
$it_seo_title = isset($it_seo_title) ? $it_seo_title : '';
include_once(G5_LIB_PATH.'/iteminfo.lib.php');
$it = get_shop_item_with_category($it_id, $it_seo_title);
$it_id = $it['it_id'];
if( isset($row['it_seo_title']) && ! $row['it_seo_title'] ){
shop_seo_title_update($row['it_id']);
}
// 분류사용, 상품사용하는 상품의 정보를 얻음
$sql = " select a.*, b.ca_name, b.ca_use from {$g5['g5_shop_item_table']} a, {$g5['g5_shop_category_table']} b where a.it_id = '$it_id' and a.ca_id = b.ca_id ";
$it = sql_fetch($sql);
if (!$it['it_id'])
alert('자료가 없습니다.');
if (!($it['ca_use'] && $it['it_use'])) {
@ -20,6 +23,8 @@ if (!($it['ca_use'] && $it['it_use'])) {
alert('현재 판매가능한 상품이 아닙니다.');
}
include_once(G5_LIB_PATH.'/iteminfo.lib.php');
// 분류 테이블에서 분류 상단, 하단 코드를 얻음
$sql = " select ca_skin_dir, ca_include_head, ca_include_tail, ca_cert_use, ca_adult_use from {$g5['g5_shop_category_table']} where ca_id = '{$it['ca_id']}' ";
$ca = sql_fetch($sql);
@ -120,7 +125,7 @@ if(defined('G5_THEME_USE_ITEM_CATEGORY') && G5_THEME_USE_ITEM_CATEGORY){
}
if ($is_admin) {
echo '<div class="sit_admin"><a href="'.G5_ADMIN_URL.'/shop_admin/itemform.php?w=u&amp;it_id='.$it_id.'" class="btn_admin">상품 관리</a></div>';
echo '<div class="sit_admin"><a href="'.G5_ADMIN_URL.'/shop_admin/itemform.php?w=u&amp;it_id='.$it_id.'" class="btn_admin btn" title="상품 관리"><span class="sound_only">상품 관리</span><i class="fa fa-cog fa-spin fa-fw"></i></a></div>';
}
?>
@ -133,14 +138,15 @@ echo '<div id="sit_hhtml">'.conv_content($it['it_head_html'], 1).'</div>';
if (G5_HTTPS_DOMAIN)
$action_url = G5_HTTPS_DOMAIN.'/'.G5_SHOP_DIR.'/cartupdate.php';
else
$action_url = './cartupdate.php';
$action_url = G5_SHOP_URL.'/cartupdate.php';
// 이전 상품보기
$sql = " select it_id, it_name from {$g5['g5_shop_item_table']} where it_id > '$it_id' and SUBSTRING(ca_id,1,4) = '".substr($it['ca_id'],0,4)."' and it_use = '1' order by it_id asc limit 1 ";
$row = sql_fetch($sql);
if ($row['it_id']) {
$prev_title = '이전상품<span class="sound_only"> '.$row['it_name'].'</span>';
$prev_href = '<a href="./item.php?it_id='.$row['it_id'].'" id="siblings_prev">';
$prev_href = '<a href="'.get_pretty_url('shop', $row['it_id']).'" id="siblings_prev">';
$prev_href2 = '</a>'.PHP_EOL;
} else {
$prev_title = '';
@ -153,7 +159,7 @@ $sql = " select it_id, it_name from {$g5['g5_shop_item_table']} where it_id < '$
$row = sql_fetch($sql);
if ($row['it_id']) {
$next_title = '다음 상품<span class="sound_only"> '.$row['it_name'].'</span>';
$next_href = '<a href="./item.php?it_id='.$row['it_id'].'" id="siblings_next">';
$next_href = '<a href="'.get_pretty_url('shop', $row['it_id']).'" id="siblings_next">';
$next_href2 = '</a>'.PHP_EOL;
} else {
$next_title = '';
@ -183,7 +189,7 @@ if($default['de_rel_list_use']) {
// 소셜 관련
$sns_title = get_text($it['it_name']).' | '.get_text($config['cf_title']);
$sns_url = G5_SHOP_URL.'/item.php?it_id='.$it['it_id'];
$sns_url = shop_item_url($it['it_id']);
$sns_share_links .= get_sns_share_link('facebook', $sns_url, $sns_title, G5_SHOP_SKIN_URL.'/img/facebook.png').' ';
$sns_share_links .= get_sns_share_link('twitter', $sns_url, $sns_title, G5_SHOP_SKIN_URL.'/img/twitter.png').' ';
$sns_share_links .= get_sns_share_link('googleplus', $sns_url, $sns_title, G5_SHOP_SKIN_URL.'/img/gplus.png');
@ -203,10 +209,10 @@ if($is_orderable) {
$supply_item = get_item_supply($it['it_id'], $it['it_supply_subject'], '');
} else {
// 선택 옵션 ( 기존의 tr td 태그로 가져오려면 'div' 를 '' 로 바꾸거나 또는 지워주세요 )
$option_item = get_item_options($it['it_id'], $it['it_option_subject'], 'div');
$option_item = get_item_options($it['it_id'], $it['it_option_subject'], 'div', 1);
// 추가 옵션 ( 기존의 tr td 태그로 가져오려면 'div' 를 '' 로 바꾸거나 또는 지워주세요 )
$supply_item = get_item_supply($it['it_id'], $it['it_supply_subject'], 'div');
$supply_item = get_item_supply($it['it_id'], $it['it_supply_subject'], 'div', 1);
}
// 상품 선택옵션 수

View File

@ -8,6 +8,13 @@ $it_id = preg_replace($pattern, '', $_POST['it_id']);
$opt_id = addslashes(sql_real_escape_string(preg_replace(G5_OPTION_ID_FILTER, '', $_POST['opt_id'])));
$idx = preg_replace('#[^0-9]#', '', $_POST['idx']);
$sel_count = preg_replace('#[^0-9]#', '', $_POST['sel_count']);
$op_title = isset($_POST['op_title']) ? strip_tags($_POST['op_title']) : '';
$it = get_shop_item($it_id, true);
if( !$it ){
die('');
}
/*
옵션명 비슷한 부분 오류 수정
@ -22,7 +29,16 @@ $sql = " select * from {$g5['g5_shop_item_option_table']}
order by io_no asc ";
$result = sql_query($sql);
$str = '<option value="">선택</option>';
$option_title = '선택';
if( $op_title && ($op_title !== $option_title) && $it['it_option_subject'] ){
$array_tmps = explode(',', $it['it_option_subject']);
if( isset($array_tmps[$idx+1]) && $array_tmps[$idx+1] ){
$option_title = $array_tmps[$idx+1];
}
}
$str = '<option value="">'.$option_title.'</option>';
$opt = array();
for($i=0; $row=sql_fetch_array($result); $i++) {

View File

@ -58,9 +58,9 @@ function itemqa_page($write_pages, $cur_page, $total_page, $url, $add="")
return "";
}
$itemqa_list = "./itemqalist.php";
$itemqa_form = "./itemqaform.php?it_id=".$it_id;
$itemqa_formupdate = "./itemqaformupdate.php?it_id=".$it_id;
$itemqa_list = G5_SHOP_URL."/itemqalist.php";
$itemqa_form = G5_SHOP_URL."/itemqaform.php?it_id=".$it_id;
$itemqa_formupdate = G5_SHOP_URL."/itemqaformupdate.php?it_id=".$it_id;
$sql_common = " from `{$g5['g5_shop_item_qa_table']}` where it_id = '{$it_id}' ";

View File

@ -17,8 +17,7 @@ $it_id = get_search_string(trim($_REQUEST['it_id']));
$iq_id = preg_replace('/[^0-9]/', '', trim($_REQUEST['iq_id']));
// 상품정보체크
$sql = " select it_id from {$g5['g5_shop_item_table']} where it_id = '$it_id' ";
$row = sql_fetch($sql);
$row = get_shop_item($it_id, true);
if(!$row['it_id'])
alert_close('상품정보가 존재하지 않습니다.');

View File

@ -24,7 +24,7 @@ if ($w == "" || $w == "u") {
if($is_mobile_shop)
$url = './iteminfo.php?it_id='.$it_id.'&info=qa';
else
$url = "./item.php?it_id=$it_id&_=".get_token()."#sit_qa";
$url = shop_item_url($it_id)."?_=".get_token()."#sit_qa";
if ($w == "")
{

View File

@ -30,35 +30,31 @@ include_once(G5_PATH.'/head.sub.php');
<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">
<div class="tbl_wrap">
<table>
<colgroup>
<col class="grid_3">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row"><label for="to_email">추천받는 분<br>E-mail<strong class="sound_only"> 필수</strong></label></th>
<td><input type="text" name="to_email" id="to_email" required class="frm_input required" size="51"></td>
</tr>
<tr>
<th scope="row"><label for="subject">제목<strong class="sound_only"> 필수</strong></label></th>
<td><input type="text" name="subject" id="subject" required class="frm_input required" size="51"></td>
</tr>
<tr>
<th scope="row"><label for="content">내용<strong class="sound_only"> 필수</strong></label></th>
<td><textarea name="content" id="content" required class="required"></textarea></td>
</tr>
</tbody>
<tbody>
<tr>
<th><label for="to_email">추천받는 분<br>E-mail<strong class="sound_only"> 필수</strong></label></th>
<td><input type="text" name="to_email" id="to_email" required class="frm_input full_input required" size="51"></td>
</tr>
<tr>
<th><label for="subject">제목<strong class="sound_only"> 필수</strong></label></th>
<td><input type="text" name="subject" id="subject" required class="frm_input full_input required" size="51"></td>
</tr>
<tr>
<th><label for="content">내용<strong class="sound_only"> 필수</strong></label></th>
<td><textarea name="content" id="content" required class="frm_input required"></textarea></td>
</tr>
</tbody>
</table>
</div>
<div class="win_btn">
<input type="submit" id="btn_submit" value="보내기" class="btn_submit">
<a href="javascript:window.close();">창닫기</a>
<button type="submit" id="btn_submit" class="btn_submit">보내기</button>
<button onclick="javascript:window.close();" class="btn_close">닫기</button>
</div>
</form>
</div>
<script>

View File

@ -28,8 +28,7 @@ if ($_POST["token"] && get_session("ss_token") == $_POST["token"]) {
}
// 상품
$sql = " select * from {$g5['g5_shop_item_table']} where it_id = '$it_id' ";
$it = sql_fetch($sql);
$it = get_shop_item($it_id, true);
if (!$it['it_id'])
alert("등록된 상품이 아닙니다.");

View File

@ -5,10 +5,7 @@ $g5['title'] = '상품 재입고 알림 (SMS)';
include_once(G5_PATH.'/head.sub.php');
// 상품정보
$sql = " select it_id, it_name, it_soldout, it_stock_sms
from {$g5['g5_shop_item_table']}
where it_id = '$it_id' ";
$it = sql_fetch($sql);
$it = get_shop_item($it_id, true);
if(!$it['it_id'])
alert_close('상품정보가 존재하지 않습니다.');
@ -18,6 +15,11 @@ if(!$it['it_soldout'] || !$it['it_stock_sms'])
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.G5_SHOP_SKIN_URL.'/style.css">', 0);
if (G5_IS_MOBILE) {
add_stylesheet('<link rel="stylesheet" href="'.G5_MSHOP_SKIN_URL.'/style.css">', 0);
}
?>
<div id="sit_sms_new" class="new_win">
@ -26,14 +28,14 @@ add_stylesheet('<link rel="stylesheet" href="'.G5_SHOP_SKIN_URL.'/style.css">',
<form name="fstocksms" method="post" action="<?php echo G5_HTTPS_SHOP_URL; ?>/itemstocksmsupdate.php" onsubmit="return fstocksms_submit(this);" autocomplete="off">
<input type="hidden" name="it_id" value="<?php echo $it_id; ?>">
<div class="form_01 new_win_con">
<div class="form_01">
<ul>
<li class="prd_name">
<?php echo $it['it_name']; ?>
</li>
<li>
<label for="ss_hp" class="sound_only">휴대폰번호<strong> 필수</strong></label>
<input type="text" name="ss_hp" value="<?php echo $member['mb_hp']; ?>" id="ss_hp" required class="required frm_input full_input">
<input type="text" name="ss_hp" value="<?php echo $member['mb_hp']; ?>" id="ss_hp" required class="required frm_input full_input" placeholder="휴대폰번호">
</li>
<li>
<strong>개인정보처리방침안내</strong>
@ -41,12 +43,13 @@ add_stylesheet('<link rel="stylesheet" href="'.G5_SHOP_SKIN_URL.'/style.css">',
</li>
</ul>
<div id="sms_agree" class="win_desc">
<label for="agree">개인정보처리방침안내의 내용에 동의합니다.</label>
<input type="checkbox" name="agree" value="1" id="agree">
<div id="sms_agree" class="chk_box">
<input type="checkbox" name="agree" value="1" id="agree" class="selec_chk">
<label for="agree"><span></span>개인정보처리방침안내의 내용에 동의합니다.</label>
</div>
<div class="win_btn">
<input type="submit" value="확인" class="btn_submit">
<button type="submit" class="btn_submit">확인</button>
<button type="button" onclick="window.close();" class="btn_close">닫기</button>
</div>
</div>

View File

@ -2,10 +2,7 @@
include_once('./_common.php');
// 상품정보
$sql = " select it_id, it_name, it_soldout, it_stock_sms
from {$g5['g5_shop_item_table']}
where it_id = '$it_id' ";
$it = sql_fetch($sql);
$it = get_shop_item($it_id, true);
if(!$it['it_id'])
alert_close('상품정보가 존재하지 않습니다.');

View File

@ -58,9 +58,9 @@ function itemuse_page($write_pages, $cur_page, $total_page, $url, $add="")
return "";
}
$itemuse_list = "./itemuselist.php";
$itemuse_form = "./itemuseform.php?it_id=".$it_id;
$itemuse_formupdate = "./itemuseformupdate.php?it_id=".$it_id;
$itemuse_list = G5_SHOP_URL."/itemuselist.php";
$itemuse_form = G5_SHOP_URL."/itemuseform.php?it_id=".$it_id;
$itemuse_formupdate = G5_SHOP_URL."/itemuseformupdate.php?it_id=".$it_id;
$sql_common = " from `{$g5['g5_shop_item_use_table']}` where it_id = '{$it_id}' and is_confirm = '1' ";

View File

@ -17,8 +17,7 @@ $it_id = get_search_string(trim($_REQUEST['it_id']));
$is_id = preg_replace('/[^0-9]/', '', trim($_REQUEST['is_id']));
// 상품정보체크
$sql = " select it_id from {$g5['g5_shop_item_table']} where it_id = '$it_id' ";
$row = sql_fetch($sql);
$row = get_shop_item($it_id, true);
if(!$row['it_id'])
alert_close('상품정보가 존재하지 않습니다.');

View File

@ -29,7 +29,7 @@ if ($w == "" || $w == "u") {
if($is_mobile_shop)
$url = './iteminfo.php?it_id='.$it_id.'&info=use';
else
$url = "./item.php?it_id=$it_id&_=".get_token()."#sit_use";
$url = shop_item_url($it_id)."?_=".get_token()."#sit_use";
if ($w == "")
{

View File

@ -9,16 +9,14 @@ if (G5_IS_MOBILE) {
$it_id = get_search_string(trim($_GET['it_id']));
$no = (isset($_GET['no']) && $_GET['no']) ? (int) $_GET['no'] : 1;
$sql = " select it_id, it_name, it_img1, it_img2, it_img3, it_img4, it_img5, it_img6, it_img7, it_img8, it_img9, it_img10
from {$g5['g5_shop_item_table']} where it_id='$it_id' ";
$row = sql_fetch_array(sql_query($sql));
$row = get_shop_item($it_id, true);
if(!$row['it_id'])
alert_close('상품정보가 존재하지 않습니다.');
$imagefile = G5_DATA_PATH.'/item/'.$row['it_img'.$no];
$imagefileurl = G5_DATA_URL.'/item/'.$row['it_img'.$no];
$size = @getimagesize($imagefile);
$imagefileurl = run_replace('get_item_image_url', G5_DATA_URL.'/item/'.$row['it_img'.$no], $row, $no);
$size = file_exists($imagefile) ? @getimagesize($imagefile) : array();
$g5['title'] = "{$row['it_name']} ($it_id)";
include_once(G5_PATH.'/head.sub.php');

View File

@ -61,7 +61,7 @@ if($ca['ca_skin_dir']) {
define('G5_SHOP_CSS_URL', str_replace(G5_PATH, G5_URL, $skin_dir));
if ($is_admin)
echo '<div class="sct_admin"><a href="'.G5_ADMIN_URL.'/shop_admin/categoryform.php?w=u&amp;ca_id='.$ca_id.'" class="btn_admin">분류 관리</a></div>';
echo '<div class="sct_admin"><a href="'.G5_ADMIN_URL.'/shop_admin/categoryform.php?w=u&amp;ca_id='.$ca_id.'" class="btn_admin btn"><span class="sound_only">분류 관리</span><i class="fa fa-cog fa-spin fa-fw"></i></a></div>';
?>
<script>

View File

@ -38,8 +38,6 @@ if ($sort != '')
else
$order_by = 'it_order, it_id desc';
echo $sql;
if (!$skin || preg_match('#\.+[\\\/]#', $skin))
$skin = $default['de_listtype_list_skin'];
else

View File

@ -26,7 +26,7 @@ $ft_a_st = 'display:block;padding:30px 0;background:#484848;color:#fff;text-alig
<p style="<?php echo $cont_st; ?>"><b><?php echo $from_name; ?></b> 님께서 추천하신 상품입니다.</p>
<div style="margin:0 0 10px;text-align:center">
<a href="<?php echo G5_SHOP_URL.'/item.php?it_id='.$it_id; ?>" target="_blank" style="display:inline-block;margin:0 0 10px"><?php echo $it_mimg; ?></a><br>
<a href="<?php echo shop_item_url($it_id); ?>" target="_blank" style="display:inline-block;margin:0 0 10px"><?php echo $it_mimg; ?></a><br>
<?php echo $it_name; ?>
</div>
@ -37,7 +37,7 @@ $ft_a_st = 'display:block;padding:30px 0;background:#484848;color:#fff;text-alig
<p style="<?php echo $cont_st; ?>"><?php echo $content; ?></p>
<a href="<?php echo G5_SHOP_URL.'/item.php?it_id='.$it_id; ?>" target="_blank" style="<?php echo $ft_a_st; ?>">상품 자세히 보기</a>
<a href="<?php echo shop_item_url($it_id); ?>" target="_blank" style="<?php echo $ft_a_st; ?>">상품 자세히 보기</a>
</div>
</div>

View File

@ -39,7 +39,7 @@ $ft_a_st = 'display:block;padding:30px 0;background:#484848;color:#fff;text-alig
<tbody>
<?php for ($h=0; $h<count($cart_list); $h++) { ?>
<tr>
<td style="<?php echo $td_st; ?>"><a href="<?php echo G5_SHOP_URL; ?>/item.php?it_id=<?php echo $cart_list[$h]['it_id']; ?>" target="_blank" style="text-decoration:none"><?php echo $cart_list[$h]['it_name']; ?></a></td>
<td style="<?php echo $td_st; ?>"><a href="<?php echo shop_item_url($cart_list[$h]['it_id']); ?>" target="_blank" style="text-decoration:none"><?php echo $cart_list[$h]['it_name']; ?></a></td>
<td style="<?php echo $td_st; ?>;text-align:center"><?php echo $cart_list[$h]['it_opt']; ?></td>
<td style="<?php echo $td_st; ?>;text-align:center"><?php echo $cart_list[$h]['ct_status']; ?></td>
</tr>

View File

@ -38,7 +38,7 @@ $ft_a_st = 'display:block;padding:30px 0;background:#484848;color:#fff;text-alig
<?php for ($i=0; $i<count($list); $i++) { ?>
<tr>
<th scope="row" style="<?php echo $th_st; ?>">상품명</th>
<td style="<?php echo $td_st; ?>"><a href="<?php echo G5_SHOP_URL.'/item.php?it_id='.$list[$i]['it_id']; ?>" target="_blank" style="text-decoration:none"><span style="display:inline-block;vertical-align:middle"><?php echo $list[$i]['it_simg']; ?></span> <?php echo $list[$i]['it_name']; ?></a></td>
<td style="<?php echo $td_st; ?>"><a href="<?php echo shop_item_url($list[$i]['it_id']); ?>" target="_blank" style="text-decoration:none"><span style="display:inline-block;vertical-align:middle"><?php echo $list[$i]['it_simg']; ?></span> <?php echo $list[$i]['it_name']; ?></a></td>
</tr>
<tr>
<th scope="row" style="<?php echo $th_st; ?>">판매가격</th>

View File

@ -38,7 +38,7 @@ $ft_a_st = 'display:block;padding:30px 0;background:#484848;color:#fff;text-alig
<?php for ($i=0; $i<count($list); $i++) { ?>
<tr>
<th scope="row" style="<?php echo $th_st; ?>">상품명</th>
<td style="<?php echo $td_st; ?>"><a href="<?php echo G5_SHOP_URL.'/item.php?it_id='.$list[$i]['it_id']; ?>" target="_blank" style="text-decoration:none"><span style="display:inline-block;vertical-align:middle"><?php echo $list[$i]['it_simg']; ?></span> <?php echo $list[$i]['it_name']; ?></a></td>
<td style="<?php echo $td_st; ?>"><a href="<?php echo shop_item_url($list[$i]['it_id']); ?>" target="_blank" style="text-decoration:none"><span style="display:inline-block;vertical-align:middle"><?php echo $list[$i]['it_simg']; ?></span> <?php echo $list[$i]['it_name']; ?></a></td>
</tr>
<tr>
<th scope="row" style="<?php echo $th_st; ?>">판매가격</th>

View File

@ -37,7 +37,7 @@ $ft_a_st = 'display:block;padding:30px 0;background:#484848;color:#fff;text-alig
<tbody>
<tr>
<th scope="row" style="<?php echo $th_st; ?>">상품명</th>
<td style="<?php echo $td_st; ?>"><a href="<?php echo G5_SHOP_URL.'/item.php?it_id='.$list[$i]['it_id']; ?>" target="_blank" style="text-decoration:none"><span style="display:inline-block;vertical-align:middle"><?php echo $list[$i]['it_simg']; ?></span> <?php echo $list[$i]['it_name']; ?></a></td>
<td style="<?php echo $td_st; ?>"><a href="<?php echo shop_item_url($list[$i]['it_id']); ?>" target="_blank" style="text-decoration:none"><span style="display:inline-block;vertical-align:middle"><?php echo $list[$i]['it_simg']; ?></span> <?php echo $list[$i]['it_name']; ?></a></td>
</tr>
<tr>
<th scope="row" style="<?php echo $th_st; ?>">판매가격</th>

View File

@ -43,22 +43,41 @@ for($k=0; $cp=sql_fetch_array($res); $k++) {
<!-- 회원정보 개요 시작 { -->
<section id="smb_my_ov">
<h2>회원정보 개요</h2>
<strong class="my_ov_name"><img src="<?php echo G5_THEME_IMG_URL ;?>/no_profile.gif" alt="프로필이미지"> <?php echo $member['mb_name']; ?></strong>
<dl class="cou_pt">
<dt>보유포인트</dt>
<dd><a href="<?php echo G5_BBS_URL; ?>/point.php" target="_blank" class="win_point"><?php echo number_format($member['mb_point']); ?></a> 점</dd>
<dt>보유쿠폰</dt>
<dd><a href="<?php echo G5_SHOP_URL; ?>/coupon.php" target="_blank" class="win_coupon"><?php echo number_format($cp_count); ?></a></dd>
</dl>
<div id="smb_my_act">
<ul>
<?php if ($is_admin == 'super') { ?><li><a href="<?php echo G5_ADMIN_URL; ?>/" class="btn_admin">관리자</a></li><?php } ?>
<li><a href="<?php echo G5_BBS_URL; ?>/memo.php" target="_blank" class="win_memo btn01">쪽지함</a></li>
<li><a href="<?php echo G5_BBS_URL; ?>/member_confirm.php?url=register_form.php" class="btn01">회원정보수정</a></li>
<li><a href="<?php echo G5_BBS_URL; ?>/member_confirm.php?url=member_leave.php" onclick="return member_leave();" class="btn01">회원탈퇴</a></li>
</ul>
<div class="smb_me">
<strong class="my_ov_name"><img src="<?php echo G5_THEME_IMG_URL ;?>/no_profile.gif" alt="프로필이미지"><br><?php echo $member['mb_name']; ?></strong><br>
<a href="<?php echo G5_BBS_URL ?>/member_confirm.php?url=register_form.php" class="smb_info">정보수정</a>
<a href="<?php echo G5_BBS_URL ?>/logout.php">로그아웃</a>
</div>
<ul id="smb_private">
<li>
<a href="<?php echo G5_BBS_URL ?>/point.php" target="_blank" class="win_point">
<i class="fa fa-database" aria-hidden="true"></i>포인트
<strong><?php echo number_format($member['mb_point']); ?></strong>
</a>
</li>
<li>
<a href="<?php echo G5_SHOP_URL ?>/coupon.php" target="_blank" class="win_coupon">
<i class="fa fa-ticket" aria-hidden="true"></i>쿠폰
<strong><?php echo number_format($cp_count); ?></strong>
</a>
</li>
<li>
<a href="<?php echo G5_BBS_URL ?>/memo.php" target="_blank" class="win_memo">
<i class="fa fa-envelope-o" aria-hidden="true"></i><span class="sound_only">안 읽은 </span>쪽지
<strong><?php echo $memo_not_read ?></strong>
</a>
</li>
<li>
<a href="<?php echo G5_BBS_URL ?>/scrap.php" target="_blank" class="win_scrap">
<i class="fa fa-thumb-tack" aria-hidden="true"></i>스크랩
<strong class="scrap">0</strong>
</a>
</li>
</ul>
<h3>내정보</h3>
<dl class="op_area">
<dt>연락처</dt>
<dd><?php echo ($member['mb_tel'] ? $member['mb_tel'] : '미등록'); ?></dd>
@ -71,78 +90,93 @@ for($k=0; $cp=sql_fetch_array($res); $k++) {
<dt id="smb_my_ovaddt">주소</dt>
<dd id="smb_my_ovaddd"><?php echo sprintf("(%s%s)", $member['mb_zip1'], $member['mb_zip2']).' '.print_address($member['mb_addr1'], $member['mb_addr2'], $member['mb_addr3'], $member['mb_addr_jibeon']); ?></dd>
</dl>
<div class="my_ov_btn"><button type="button" class="btn_op_area"><i class="fa fa-caret-up" aria-hidden="true"></i><span class="sound_only">상세정보 보기</span></button></div>
<a href="<?php echo G5_BBS_URL; ?>/member_confirm.php?url=member_leave.php" onclick="return member_leave();" class="withdrawal">회원탈퇴</a>
</section>
<script>
$(".btn_op_area").on("click", function() {
$(".op_area").toggle();
$(".fa-caret-up").toggleClass("fa-caret-down")
});
</script>
<!-- } 회원정보 개요 끝 -->
<!-- 최근 주문내역 시작 { -->
<section id="smb_my_od">
<h2>최근 주문내역</h2>
<?php
// 최근 주문내역
define("_ORDERINQUIRY_", true);
<div id="smb_my_list">
<!-- 최근 주문내역 시작 { -->
<section id="smb_my_od">
<h2>주문내역조회</h2>
<?php
// 최근 주문내역
define("_ORDERINQUIRY_", true);
$limit = " limit 0, 5 ";
include G5_SHOP_PATH.'/orderinquiry.sub.php';
?>
<div class="smb_my_more">
<a href="./orderinquiry.php">더보기</a>
</div>
</section>
<!-- } 최근 주문내역 끝 -->
<!-- 최근 위시리스트 시작 { -->
<section id="smb_my_wish">
<h2>최근 위시리스트</h2>
<form name="fwishlist" method="post" action="./cartupdate.php">
<input type="hidden" name="act" value="multi">
<input type="hidden" name="sw_direct" value="">
<input type="hidden" name="prog" value="wish">
<ul>
<?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, 8 ";
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++)
{
$image = get_it_image($row['it_id'], 100, 100, true);
?>
$limit = " limit 0, 5 ";
include G5_SHOP_PATH.'/orderinquiry.sub.php';
?>
<li>
<div class="smb_my_chk">
<?php if(is_soldout($row['it_id'])) { //품절검사 ?> 품절
<?php } else { //품절이 아니면 체크할수 있도록한다 ?>
<div class="chk_box">
<input type="checkbox" name="chk_it_id[<?php echo $i; ?>]" value="1" id="chk_it_id_<?php echo $i; ?>" onclick="out_cd_check(this, '<?php echo $out_cd; ?>');" class="selec_chk">
<label for="chk_it_id_<?php echo $i; ?>"><span></span><b class="sound_only"><?php echo $row['it_name']; ?></b></label>
</div>
<?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">
</div>
<div class="smb_my_img"><?php echo $image; ?></div>
<div class="smb_my_tit"><a href="<?php echo shop_item_url($row['it_id']); ?>"><?php echo stripslashes($row['it_name']); ?></a></div>
<div class="smb_my_price"><?php echo display_price(get_price($row), $row['it_tel_inq']); ?></div>
<div class="smb_my_date"><?php echo $row['wi_time']; ?></div>
<a href="./wishupdate.php?w=d&amp;wi_id=<?php echo $row['wi_id']; ?>" class="wish_del"><i class="fa fa-trash" aria-hidden="true"></i><span class="sound_only">삭제</span></a>
</li>
<div class="smb_my_more">
<a href="./orderinquiry.php">더보기</a>
</div>
</section>
<!-- } 최근 주문내역 끝 -->
<!-- 최근 위시리스트 시작 { -->
<section id="smb_my_wish">
<h2>최근 위시리스트</h2>
<div class="list_02">
<ul>
<?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, 8 ";
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++)
{
$image = get_it_image($row['it_id'], 230, 230, true);
?>
<li>
<div class="smb_my_img"><?php echo $image; ?></div>
<div class="smb_my_tit"><a href="./item.php?it_id=<?php echo $row['it_id']; ?>"><?php echo stripslashes($row['it_name']); ?></a></div>
<div class="smb_my_date"><?php echo $row['wi_time']; ?></div>
</li>
<?php
}
if ($i == 0)
echo '<li class="empty_li">보관 내역이 없습니다.</li>';
?>
</ul>
</div>
<div class="smb_my_more">
<a href="./wishlist.php">더보기</a>
</div>
</section>
<!-- } 최근 위시리스트 끝 -->
<?php
}
if ($i == 0)
echo '<li class="empty_li">보관 내역이 없습니다.</li>';
?>
</ul>
<div class="smb_my_more">
<a href="./wishlist.php">더보기</a>
</div>
<div id="smb_ws_act">
<button type="submit" class="btn01" onclick="return fwishlist_check(document.fwishlist,'');">장바구니</button>
<button type="submit" class="btn02" onclick="return fwishlist_check(document.fwishlist,'direct_buy');">주문하기</button>
</div>
</form>
</section>
<!-- } 최근 위시리스트 끝 -->
</div>
</div>
<script>
@ -158,6 +192,50 @@ function member_leave()
{
return confirm('정말 회원에서 탈퇴 하시겠습니까?')
}
function out_cd_check(fld, out_cd)
{
if (out_cd == 'no'){
alert("옵션이 있는 상품입니다.\n\n상품을 클릭하여 상품페이지에서 옵션을 선택한 후 주문하십시오.");
fld.checked = false;
return;
}
if (out_cd == 'tel_inq'){
alert("이 상품은 전화로 문의해 주십시오.\n\n장바구니에 담아 구입하실 수 없습니다.");
fld.checked = false;
return;
}
}
function fwishlist_check(f, act)
{
var k = 0;
var length = f.elements.length;
for(i=0; i<length; i++) {
if (f.elements[i].checked) {
k++;
}
}
if(k == 0)
{
alert("상품을 하나 이상 체크 하십시오");
return false;
}
if (act == "direct_buy")
{
f.sw_direct.value = 1;
}
else
{
f.sw_direct.value = 0;
}
return true;
}
</script>
<!-- } 마이페이지 끝 -->

View File

@ -25,8 +25,7 @@ echo '<?xml version="1.0" encoding="UTF-8"?>';
<response>
<?php
foreach($itemIds as $it_id) {
$sql = " select * from {$g5['g5_shop_item_table']} where it_id = '$it_id' ";
$it = sql_fetch($sql);
$it = get_shop_item($it_id, true);
if(!$it['it_id'])
continue;
@ -60,7 +59,7 @@ foreach($itemIds as $it_id) {
<name><![CDATA[<?php echo $it['ec_mall_pid']; ?>]]></name>
<?php } ?>
<name><![CDATA[<?php echo $name; ?>]]></name>
<url><?php echo G5_SHOP_URL.'/item.php?it_id='.$it_id; ?></url>
<url><?php echo shop_item_url($it_id); ?></url>
<description><![CDATA[<?php echo $description; ?>]]></description>
<image><?php echo $image; ?></image>
<thumb><?php echo $image; ?></thumb>

View File

@ -85,7 +85,7 @@ $sel_options = array();
$sup_options = array();
if($_POST['naverpay_form'] == 'item.php')
$back_uri = '/item.php?it_id='.$_POST['it_id'][0];
$back_uri = shop_item_url($_POST['it_id'][0]);
else if($_POST['naverpay_form'] == 'cart.php')
$back_uri = '/cart.php';
else
@ -106,8 +106,7 @@ for($i=0; $i<$count; $i++) {
}
// 상품정보
$sql = " select * from {$g5['g5_shop_item_table']} where it_id = '$it_id' ";
$it = sql_fetch($sql);
$it = get_shop_item($it_id, true);
if(!$it['it_id'])
return_error2json('상품정보가 존재하지 않습니다.');

View File

@ -14,8 +14,7 @@ for($i=0; $i<$count; $i++) {
$it_id = $_POST['it_id'][$i];
// 상품정보
$sql = " select * from {$g5['g5_shop_item_table']} where it_id = '$it_id' ";
$it = sql_fetch($sql);
$it = get_shop_item($it_id, true);
if(!$it['it_id'])
alert_close('상품정보가 존재하지 않습니다.');
@ -24,7 +23,7 @@ for($i=0; $i<$count; $i++) {
$description = urlencode($it['it_basic']);
$price = get_price($it);
$image = urlencode(get_naverpay_item_image_url($it_id));
$item_url = urlencode(G5_SHOP_URL.'/item.php?it_id='.$it_id);
$item_url = urlencode(shop_item_url($it_id));
$item .= '&ITEM_ID='.$id;
if($it['ec_mall_pid'])

View File

@ -54,64 +54,63 @@ include_once(G5_PATH.'/head.sub.php');
<form name="forderaddress" method="post" action="<?php echo $order_action_url; ?>" autocomplete="off">
<div id="sod_addr" class="new_win">
<h1 id="win_title"><i class="fa fa-address-book-o" aria-hidden="true"></i> 배송지 목록</h1>
<div class="new_win_con">
<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>
</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_addr3'].$sep.$row['ad_jibeon'].$sep.$row['ad_subject'];
$addr = get_text($addr);
?>
<tr>
<td class="td_sbj">
<input type="hidden" name="ad_id[<?php echo $i; ?>]" value="<?php echo $row['ad_id'];?>">
<label for="chk_<?php echo $i;?>" class="sound_only">배송지선택</label>
<input type="checkbox" name="chk[]" value="<?php echo $i;?>" id="chk_<?php echo $i;?>">
<label for="ad_subject<?php echo $i;?>" class="sound_only">배송지명</label>
<input type="text" name="ad_subject[<?php echo $i; ?>]" id="ad_subject<?php echo $i;?>" class="frm_input" size="12" maxlength="20" value="<?php echo get_text($row['ad_subject']); ?>">
</td>
<h1 id="win_title">배송지 목록</h1>
<div class="tbl_head03 tbl_wrap">
<table>
<thead>
<tr>
<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_addr3'].$sep.$row['ad_jibeon'].$sep.$row['ad_subject'];
$addr = get_text($addr);
?>
<tr>
<td class="td_sbj">
<div class="chk_box">
<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;?>" class="selec_chk">
<label for="chk_<?php echo $i;?>"><span></span><b class="sound_only">배송지선택</b></label>
</div>
<label for="ad_subject<?php echo $i;?>" class="sound_only">배송지명</label>
<input type="text" name="ad_subject[<?php echo $i; ?>]" id="ad_subject<?php echo $i;?>" class="frm_input" size="12" maxlength="20" value="<?php echo get_text($row['ad_subject']); ?>">
</td>
<td class="td_name"><?php echo get_text($row['ad_name']); ?></td>
<td class="td_address">
<?php echo print_address($row['ad_addr1'], $row['ad_addr2'], $row['ad_addr3'], $row['ad_jibeon']); ?><br>
<span class="ad_tel"><?php echo $row['ad_tel']; ?> / <?php echo $row['ad_hp']; ?></span>
<td class="td_name"><?php echo get_text($row['ad_name']); ?></td>
<td class="td_address">
<?php echo print_address($row['ad_addr1'], $row['ad_addr2'], $row['ad_addr3'], $row['ad_jibeon']); ?><br>
<span class="ad_tel"><?php echo $row['ad_tel']; ?> / <?php echo $row['ad_hp']; ?></span>
</td>
<td class="td_mng">
<input type="hidden" value="<?php echo $addr; ?>" >
<button type="button" class="sel_address mng_btn">선택</button>
<a href="<?php echo $_SERVER['SCRIPT_NAME']; ?>?w=d&amp;ad_id=<?php echo $row['ad_id']; ?>" class="del_address mng_btn">삭제</a>
<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"';?>>
<label for="ad_default<?php echo $i;?>" class="default_lb mng_btn">기본배송지</label>
</td>
<td class="td_mng">
<input type="hidden" value="<?php echo $addr; ?>" >
<button type="button" class="sel_address mng_btn">선택</button>
<a href="<?php echo $_SERVER['SCRIPT_NAME']; ?>?w=d&amp;ad_id=<?php echo $row['ad_id']; ?>" class="del_address mng_btn">삭제</a>
<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"';?>>
<label for="ad_default<?php echo $i;?>" class="default_lb mng_btn">기본배송지</label>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</td>
</tr>
<div class="win_btn">
<input type="submit" name="act_button" value="선택수정" class="btn_submit">
<button type="button" onclick="self.close();" class="btn_close">닫기</button>
</div>
<?php
}
?>
</tbody>
</table>
</div>
<div class="win_btn">
<input type="submit" name="act_button" value="선택수정" class="btn_submit">
<button type="button" onclick="self.close();" class="btn_close">닫기</button>
</div>
</div>
</form>

View File

@ -22,59 +22,61 @@ $count = sql_num_rows($result);
?>
<!-- 쿠폰 선택 시작 { -->
<div id="od_coupon_frm" class="od_coupon">
<h3>쿠폰 선택</h3>
<?php if($count > 0) { ?>
<div class="tbl_head02 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;
<div class="od_coupon_wrap">
<div id="od_coupon_frm" class="od_coupon">
<h3>쿠폰 선택</h3>
<?php if($count > 0) { ?>
<div class="tbl_head02 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_numbig"><?php echo number_format($dc); ?></td>
<td class="td_mngsmall"><button type="button" class="od_cp_apply btn_frmline">적용</button></td>
</tr>
?>
</tbody>
</table>
</div>
<?php
} else {
echo '<p>사용할 수 있는 쿠폰이 없습니다.</p>';
}
?>
</tbody>
</table>
</div>
<?php
} else {
echo '<p>사용할 수 있는 쿠폰이 없습니다.</p>';
}
?>
<div class="btn_confirm">
<button type="button" id="od_coupon_close" class="btn_close"><i class="fa fa-times" aria-hidden="true"></i><span class="sound_only">닫기</span></button>
<div class="btn_confirm">
<button type="button" id="od_coupon_close" class="btn_close"><i class="fa fa-times" aria-hidden="true"></i><span class="sound_only">닫기</span></button>
</div>
</div>
</div>
<!-- } 쿠폰 선택 끝 -->

View File

@ -1,4 +1,4 @@
<?php
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
require_once(G5_SHOP_PATH.'/settle_'.$default['de_pg_service'].'.inc.php');
@ -21,7 +21,7 @@ if($is_kakaopay_use) {
?>
<form name="forderform" id="forderform" method="post" action="<?php echo $order_action_url; ?>" autocomplete="off">
<div id="sod_frm">
<div id="sod_frm" class="sod_frm_pc">
<!-- 주문상품 확인 시작 { -->
<div class="tbl_head03 tbl_wrap od_prd_list">
<table id="sod_list">
@ -256,34 +256,38 @@ if($is_kakaopay_use) {
<table>
<tbody>
<tr>
<th scope="row"><label for="od_name">이름<strong class="sound_only"> 필수</strong></label></th>
<th scope="col"><label for="od_name">이름<strong class="sound_only"> 필수</strong></label></th>
<th scope="col">
<?php if (!$is_member) { // 비회원이면 ?>
<label for="od_pwd">비밀번호</label>
<button type="button" class="tooltip_icon"><i class="fa fa-question-circle-o" aria-hidden="true"></i><span class="sound_only">설명보기</span></button>
<span class="tooltip">영,숫자 3~20자 (주문서 조회시 필요)</span>
<?php } ?>
</th>
</tr>
<tr>
<td><input type="text" name="od_name" value="<?php echo get_text($member['mb_name']); ?>" id="od_name" required class="frm_input required" maxlength="20"></td>
<td><?php if (!$is_member) { // 비회원이면 ?><input type="password" name="od_pwd" id="od_pwd" required class="frm_input required" maxlength="20"><?php } ?></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>
<th scope="col"><label for="od_tel">전화번호<strong class="sound_only"> 필수</strong></label></th>
<th scope="col"><label for="od_hp">핸드폰</label></th>
</tr>
<?php } ?>
<tr>
<th scope="row"><label for="od_tel">전화번호<strong class="sound_only"> 필수</strong></label></th>
<td><input type="text" name="od_tel" value="<?php echo get_text($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 get_text($member['mb_hp']); ?>" id="od_hp" class="frm_input" maxlength="20"></td>
</tr>
<tr>
<th scope="row">주소</th>
<td>
<label for="od_zip" class="sound_only">우편번호<strong class="sound_only"> 필수</strong></label>
<input type="text" name="od_zip" value="<?php echo $member['mb_zip1'].$member['mb_zip2']; ?>" id="od_zip" required class="frm_input required" size="8" maxlength="6" placeholder="우편번호">
<button type="button" class="btn_address" onclick="win_zip('forderform', 'od_zip', 'od_addr1', 'od_addr2', 'od_addr3', 'od_addr_jibeon');">주소 검색</button><br>
<th scope="col" colspan="2">주소</th>
</tr>
<tr>
<td colspan="2">
<div class="addr">
<label for="od_zip" class="sound_only">우편번호<strong class="sound_only"> 필수</strong></label>
<input type="text" name="od_zip" value="<?php echo $member['mb_zip1'].$member['mb_zip2']; ?>" id="od_zip" required class="frm_input required" size="8" maxlength="6" placeholder="우편번호">
<button type="button" class="btn_address" onclick="win_zip('forderform', 'od_zip', 'od_addr1', 'od_addr2', 'od_addr3', 'od_addr_jibeon');">주소 검색</button><br>
</div>
<input type="text" name="od_addr1" value="<?php echo get_text($member['mb_addr1']) ?>" id="od_addr1" required class="frm_input frm_address required" size="60" placeholder="기본주소">
<label for="od_addr1" class="sound_only">기본주소<strong class="sound_only"> 필수</strong></label><br>
<input type="text" name="od_addr2" value="<?php echo get_text($member['mb_addr2']) ?>" id="od_addr2" class="frm_input frm_address" size="60" placeholder="상세주소">
@ -295,8 +299,10 @@ if($is_kakaopay_use) {
</td>
</tr>
<tr>
<th scope="row"><label for="od_email">E-mail<strong class="sound_only"> 필수</strong></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>
<th scope="col" colspan="2"><label for="od_email">E-mail<strong class="sound_only"> 필수</strong></label></th>
</tr>
<tr>
<td colspan="2"><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']) { // 배송희망일 사용 ?>
@ -327,9 +333,7 @@ if($is_kakaopay_use) {
<h2>받으시는 분</h2>
<div class="tbl_frm01 tbl_wrap">
<table>
<tbody>
<?php
<?php
if($is_member) {
// 배송지 이력
$addr_list = '';
@ -337,7 +341,7 @@ if($is_kakaopay_use) {
// 주문자와 동일
$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 .= '<label for="ad_sel_addr_same"><span></span>주문자와 동일</label>'.PHP_EOL;
// 기본배송지
$sql = " select *
@ -347,8 +351,9 @@ if($is_kakaopay_use) {
$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_addr3'].$sep.$row['ad_jibeon'].$sep.$row['ad_subject'];
$addr_list .= '<input type="radio" name="ad_sel_addr" value="'.get_text($val1).'" id="ad_sel_addr_def">'.PHP_EOL;
$addr_list .= '<label for="ad_sel_addr_def">기본배송지</label>'.PHP_EOL;
$addr_list .= '<label for="ad_sel_addr_def"><span></span>기본배송지</label>'.PHP_EOL;
}
// 최근배송지
@ -361,54 +366,66 @@ if($is_kakaopay_use) {
$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_addr3'].$sep.$row['ad_jibeon'].$sep.$row['ad_subject'];
$val2 = '<label for="ad_sel_addr_'.($i+1).'">최근배송지('.($row['ad_subject'] ? get_text($row['ad_subject']) : get_text($row['ad_name'])).')</label>';
$val2 = '<label for="ad_sel_addr_'.($i+1).'"><span></span>최근배송지('.($row['ad_subject'] ? get_text($row['ad_subject']) : get_text($row['ad_name'])).')</label>';
$addr_list .= '<input type="radio" name="ad_sel_addr" value="'.get_text($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;
$addr_list .= '<label for="od_sel_addr_new"><span></span>신규배송지</label>'.PHP_EOL;
$addr_list .='<a href="'.G5_SHOP_URL.'/orderaddress.php" id="order_address" class="btn_frmline">배송지목록</a>';
} else {
// 주문자와 동일
$addr_list .= '<input type="checkbox" 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 .= '<label for="ad_sel_addr_same"><span></span>주문자와 동일</label>'.PHP_EOL;
}
?>
<tr>
<th scope="row">배송지선택</th>
<td>
<div class="choice_place">
<span class="choice_tit">배송지선택</span>
<span class="chk_box">
<?php echo $addr_list; ?>
</td>
</tr>
<?php if($is_member) { ?>
</span>
</div>
<table>
<tbody>
<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>
<th scope="col"><label for="od_b_name">이름<strong class="sound_only"> 필수</strong></label></th>
<th scope="col"><?php if($is_member) { ?><label for="ad_subject">배송지명</label><?php } ?></th>
</tr>
<?php } ?>
<tr>
<th scope="row"><label for="od_b_name">이름<strong class="sound_only"> 필수</strong></label></th>
<td><input type="text" name="od_b_name" id="od_b_name" required class="frm_input required" maxlength="20"></td>
<td>
<?php if($is_member) { ?>
<input type="text" name="ad_subject" id="ad_subject" class="frm_input" maxlength="20">
<div class="ad_choice chk_box">
<input type="checkbox" name="ad_default" id="ad_default" value="1" class="selec_chk">
<label for="ad_default"><span></span><b>기본배송지로 설정</b></label>
</div>
<?php } ?>
</td>
</tr>
<tr>
<th scope="col"><label for="od_b_tel">전화번호<strong class="sound_only"> 필수</strong></label></th>
<th scope="col"><label for="od_b_hp">핸드폰</label></th>
</tr>
<tr>
<th scope="row"><label for="od_b_tel">전화번호<strong class="sound_only"> 필수</strong></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>
<tr>
<th scope="row">주소</th>
<td id="sod_frm_addr">
<label for="od_b_zip" class="sound_only">우편번호<strong class="sound_only"> 필수</strong></label>
<input type="text" name="od_b_zip" id="od_b_zip" required class="frm_input required" size="8" maxlength="6" placeholder="우편번호">
<button type="button" class="btn_address" onclick="win_zip('forderform', 'od_b_zip', 'od_b_addr1', 'od_b_addr2', 'od_b_addr3', 'od_b_addr_jibeon');">주소 검색</button><br>
<th scope="col" colspan="2">주소</th>
</tr>
<tr>
<td id="sod_frm_addr" colspan="2">
<div class="addr">
<label for="od_b_zip" class="sound_only">우편번호<strong class="sound_only"> 필수</strong></label>
<input type="text" name="od_b_zip" id="od_b_zip" required class="frm_input required" size="8" maxlength="6" placeholder="우편번호">
<button type="button" class="btn_address" onclick="win_zip('forderform', 'od_b_zip', 'od_b_addr1', 'od_b_addr2', 'od_b_addr3', 'od_b_addr_jibeon');">주소 검색</button><br>
</div>
<input type="text" name="od_b_addr1" id="od_b_addr1" required class="frm_input frm_address required" size="60" placeholder="기본주소">
<label for="od_b_addr1" class="sound_only">기본주소<strong> 필수</strong></label><br>
<input type="text" name="od_b_addr2" id="od_b_addr2" class="frm_input frm_address" size="60" placeholder="상세주소">
@ -420,8 +437,10 @@ if($is_kakaopay_use) {
</td>
</tr>
<tr>
<th scope="row"><label for="od_memo">전하실말씀</label></th>
<td><textarea name="od_memo" id="od_memo"></textarea></td>
<th scope="col" colspan="2"><label for="od_memo">전하실말씀</label></th>
</tr>
<tr>
<td colspan="2"><textarea name="od_memo" id="od_memo"></textarea></td>
</tr>
</tbody>
</table>
@ -433,7 +452,7 @@ if($is_kakaopay_use) {
<div class="sod_right">
<!-- 주문상품 합계 시작 { -->
<div id="sod_bsk_tot">
<ul>
<ul class="sod_info">
<li class="sod_bsk_sell">
<span>주문</span>
<strong><?php echo number_format($tot_sell_price); ?></strong>원
@ -446,258 +465,309 @@ if($is_kakaopay_use) {
<span>배송비</span>
<strong><?php echo number_format($send_cost); ?></strong>원
</li>
<li class="sod_bsk_point">
<span>포인트</span>
<strong><?php echo number_format($tot_point); ?></strong>점
</li>
<li class="sod_bsk_cnt">
</ul>
<ul class="sod_info_bt">
<li class="sod_bsk_cnt">
<span>총계</span>
<?php $tot_price = $tot_sell_price + $send_cost; // 총계 = 주문상품금액합계 + 배송비 ?>
<strong id="ct_tot_price"><?php echo number_format($tot_price); ?></strong>
<strong id="ct_tot_price"><?php echo number_format($tot_price); ?></strong>
</li>
<li class="sod_bsk_point">
<span>포인트</span>
<strong><?php echo number_format($tot_point); ?> 점</strong>
</li>
</ul>
</ul>
</div>
<!-- } 주문상품 합계 끝 -->
<!-- 결제정보 입력 시작 { -->
<?php
$oc_cnt = $sc_cnt = 0;
if($is_member) {
// 주문쿠폰
$sql = " select cp_id
from {$g5['g5_shop_coupon_table']}
where mb_id IN ( '{$member['mb_id']}', '전체회원' )
and cp_method = '2'
and cp_start <= '".G5_TIME_YMD."'
and cp_end >= '".G5_TIME_YMD."'
and cp_minimum <= '$tot_sell_price' ";
$res = sql_query($sql);
for($k=0; $cp=sql_fetch_array($res); $k++) {
if(is_used_coupon($member['mb_id'], $cp['cp_id']))
continue;
$oc_cnt++;
}
if($send_cost > 0) {
// 배송비쿠폰
$sql = " select cp_id
from {$g5['g5_shop_coupon_table']}
where mb_id IN ( '{$member['mb_id']}', '전체회원' )
and cp_method = '3'
and cp_start <= '".G5_TIME_YMD."'
and cp_end >= '".G5_TIME_YMD."'
and cp_minimum <= '$tot_sell_price' ";
$res = sql_query($sql);
for($k=0; $cp=sql_fetch_array($res); $k++) {
if(is_used_coupon($member['mb_id'], $cp['cp_id']))
continue;
$sc_cnt++;
}
}
}
?>
<section id="sod_frm_pay">
<h2>결제정보</h2>
<div class="pay_tbl">
<table>
<tbody>
<?php if($oc_cnt > 0) { ?>
<tr>
<th scope="row">주문할인</th>
<td>
<strong id="od_cp_price">0</strong>원
<input type="hidden" name="od_cp_id" value="">
<button type="button" id="od_coupon_btn" class="btn_frmline">쿠폰적용</button>
</td>
</tr>
<?php } ?>
<?php if($sc_cnt > 0) { ?>
<tr>
<th scope="row">배송비할인</th>
<td>
<strong id="sc_cp_price">0</strong>원
<input type="hidden" name="sc_cp_id" value="">
<button type="button" id="sc_coupon_btn" class="btn_frmline">쿠폰적용</button>
</td>
</tr>
<?php } ?>
<tr>
<th>추가배송비</th>
<td><strong id="od_send_cost2">0</strong>원<br>(지역에 따라 추가되는 도선료 등의 배송비입니다.)</td>
</tr>
</tbody>
</table>
<div class="sod_info_option">
<?php
$oc_cnt = $sc_cnt = 0;
if($is_member) {
// 주문쿠폰
$sql = " select cp_id
from {$g5['g5_shop_coupon_table']}
where mb_id IN ( '{$member['mb_id']}', '전체회원' )
and cp_method = '2'
and cp_start <= '".G5_TIME_YMD."'
and cp_end >= '".G5_TIME_YMD."'
and cp_minimum <= '$tot_sell_price' ";
$res = sql_query($sql);
for($k=0; $cp=sql_fetch_array($res); $k++) {
if(is_used_coupon($member['mb_id'], $cp['cp_id']))
continue;
$oc_cnt++;
}
if($send_cost > 0) {
// 배송비쿠폰
$sql = " select cp_id
from {$g5['g5_shop_coupon_table']}
where mb_id IN ( '{$member['mb_id']}', '전체회원' )
and cp_method = '3'
and cp_start <= '".G5_TIME_YMD."'
and cp_end >= '".G5_TIME_YMD."'
and cp_minimum <= '$tot_sell_price' ";
$res = sql_query($sql);
for($k=0; $cp=sql_fetch_array($res); $k++) {
if(is_used_coupon($member['mb_id'], $cp['cp_id']))
continue;
$sc_cnt++;
}
}
}
?>
<h2>결제옵션</h2>
<ul>
<?php if($oc_cnt > 0) { ?>
<li>
<span class="sod_ifop_tit">주문할인
<input type="hidden" name="od_cp_id" value="">
<button type="button" id="od_coupon_btn" class="btn_frmline">쿠폰적용</button>
</span>
<div class="sod_ifop_t">
<strong id="od_cp_price">0</strong>원
</div>
</li>
<?php } ?>
<?php if($sc_cnt > 0) { ?>
<li>
<span class="sod_ifop_tit">배송비할인
<input type="hidden" name="sc_cp_id" value="">
<button type="button" id="sc_coupon_btn" class="btn_frmline">쿠폰적용</button>
</span>
<div class="sod_ifop_t">
<strong id="sc_cp_price">0</strong>원
</div>
</li>
<?php } ?>
<li>
<div class="sod_ifop_tit">추가배송비
<button type="button" class="tooltip_icon"><i class="fa fa-question-circle-o" aria-hidden="true"></i><span class="sound_only">설명보기</span></button>
<span class="tooltip">(지역에 따라 추가되는 도선료 등의 배송비입니다.)</span>
</div>
<div class="sod_ifop_t"><strong id="od_send_cost2">0</strong>원</div>
</li>
</ul>
</div>
<div id="od_tot_price">
<span>총 주문금액</span>
<strong class="print_price"><?php echo number_format($tot_price); ?></strong>원
</div>
</div>
<!-- } 주문상품 합계 끝 -->
<div id="od_pay_sl">
<h3>결제수단</h3>
<?php
if (!$default['de_card_point'])
echo '<p id="sod_frm_pt_alert"><strong>무통장입금</strong> 이외의 결제 수단으로 결제하시는 경우 포인트를 적립해드리지 않습니다.</p>';
$multi_settle = 0;
$checked = '';
$escrow_title = "";
if ($default['de_escrow_use']) {
$escrow_title = "에스크로<br>";
}
if ($is_kakaopay_use || $default['de_bank_use'] || $default['de_vbank_use'] || $default['de_iche_use'] || $default['de_card_use'] || $default['de_hp_use'] || $default['de_easy_pay_use'] || $default['de_inicis_lpay_use']) {
echo '<fieldset id="sod_frm_paysel">';
echo '<legend>결제방법 선택</legend>';
}
// 카카오페이
if($is_kakaopay_use) {
$multi_settle++;
echo '<input type="radio" id="od_settle_kakaopay" name="od_settle_case" value="KAKAOPAY" '.$checked.'> <label for="od_settle_kakaopay" class="kakaopay_icon lb_icon">KAKAOPAY</label>'.PHP_EOL;
$checked = '';
}
// 무통장입금 사용
if ($default['de_bank_use']) {
$multi_settle++;
echo '<input type="radio" id="od_settle_bank" name="od_settle_case" value="무통장" '.$checked.'> <label for="od_settle_bank" class="lb_icon bank_icon">무통장입금</label>'.PHP_EOL;
$checked = '';
}
// 가상계좌 사용
if ($default['de_vbank_use']) {
$multi_settle++;
echo '<input type="radio" id="od_settle_vbank" name="od_settle_case" value="가상계좌" '.$checked.'> <label for="od_settle_vbank" class="lb_icon vbank_icon">'.$escrow_title.'가상계좌</label>'.PHP_EOL;
$checked = '';
}
// 계좌이체 사용
if ($default['de_iche_use']) {
$multi_settle++;
echo '<input type="radio" id="od_settle_iche" name="od_settle_case" value="계좌이체" '.$checked.'> <label for="od_settle_iche" class="lb_icon iche_icon">'.$escrow_title.'계좌이체</label>'.PHP_EOL;
$checked = '';
}
// 휴대폰 사용
if ($default['de_hp_use']) {
$multi_settle++;
echo '<input type="radio" id="od_settle_hp" name="od_settle_case" value="휴대폰" '.$checked.'> <label for="od_settle_hp" class="lb_icon hp_icon">휴대폰</label>'.PHP_EOL;
$checked = '';
}
// 신용카드 사용
if ($default['de_card_use']) {
$multi_settle++;
echo '<input type="radio" id="od_settle_card" name="od_settle_case" value="신용카드" '.$checked.'> <label for="od_settle_card" class="lb_icon card_icon">신용카드</label>'.PHP_EOL;
$checked = '';
}
// PG 간편결제
if($default['de_easy_pay_use']) {
switch($default['de_pg_service']) {
case 'lg':
$pg_easy_pay_name = 'PAYNOW';
break;
case 'inicis':
$pg_easy_pay_name = 'KPAY';
break;
default:
$pg_easy_pay_name = 'PAYCO';
break;
}
$multi_settle++;
echo '<input type="radio" id="od_settle_easy_pay" name="od_settle_case" value="간편결제" '.$checked.'> <label for="od_settle_easy_pay" class="'.$pg_easy_pay_name.' lb_icon">'.$pg_easy_pay_name.'</label>'.PHP_EOL;
$checked = '';
}
//이니시스 Lpay
if($default['de_inicis_lpay_use']) {
echo '<input type="radio" id="od_settle_inicislpay" data-case="lpay" name="od_settle_case" value="lpay" '.$checked.'> <label for="od_settle_inicislpay" class="inicis_lpay lb_icon">L.pay</label>'.PHP_EOL;
$checked = '';
}
$temp_point = 0;
// 회원이면서 포인트사용이면
if ($is_member && $config['cf_use_point'])
<!-- 포인트정보 입력 시작 { -->
<?php
$temp_point = 0;
// 회원이면서 포인트사용이면
if ($is_member && $config['cf_use_point'])
{
// 포인트 결제 사용 포인트보다 회원의 포인트가 크다면
if ($member['mb_point'] >= $default['de_settle_min_point'])
{
// 포인트 결제 사용 포인트보다 회원의 포인트가 크다면
if ($member['mb_point'] >= $default['de_settle_min_point'])
{
$temp_point = (int)$default['de_settle_max_point'];
$temp_point = (int)$default['de_settle_max_point'];
if($temp_point > (int)$tot_sell_price)
$temp_point = (int)$tot_sell_price;
if($temp_point > (int)$tot_sell_price)
$temp_point = (int)$tot_sell_price;
if($temp_point > (int)$member['mb_point'])
$temp_point = (int)$member['mb_point'];
if($temp_point > (int)$member['mb_point'])
$temp_point = (int)$member['mb_point'];
$point_unit = (int)$default['de_settle_point_unit'];
$temp_point = (int)((int)($temp_point / $point_unit) * $point_unit);
?>
<div class="sod_frm_point">
<div>
<label for="od_temp_point">사용 포인트(<?php echo $point_unit; ?>점 단위)</label>
$point_unit = (int)$default['de_settle_point_unit'];
$temp_point = (int)((int)($temp_point / $point_unit) * $point_unit);
?>
<div id="sod_point">
<h2>
<span class="point_tit">
포인트사용
<label for="od_temp_point">(<?php echo $point_unit; ?>점 단위)</label>
</span>
<span class="point_ipt">
<input type="hidden" name="max_temp_point" value="<?php echo $temp_point; ?>">
<input type="text" name="od_temp_point" value="0" id="od_temp_point" size="7"> 점
</div>
<div id="sod_frm_pt">
<span><strong>보유포인트</strong><?php echo display_point($member['mb_point']); ?></span>
<span class="max_point_box"><strong>최대 사용 가능 포인트</strong><em id="use_max_point"><?php echo display_point($temp_point); ?></em></span>
</div>
<input type="text" name="od_temp_point" value="0" id="od_temp_point" size="7"> 점
</span>
</h2>
<div id="sod_frm_pt">
<strong>보유포인트</strong><span class="my_point_box"><?php echo display_point($member['mb_point']); ?></span>
<strong>최대 사용 가능 포인트</strong><span class="max_point_box"><em id="use_max_point"><?php echo display_point($temp_point); ?></em></span>
</div>
<?php
$multi_settle++;
}
}
if ($default['de_bank_use']) {
// 은행계좌를 배열로 만든후
$str = explode("\n", trim($default['de_bank_account']));
if (count($str) <= 1)
{
$bank_account = '<input type="hidden" name="od_bank_account" value="'.$str[0].'">'.$str[0].PHP_EOL;
}
else
{
$bank_account = '<select name="od_bank_account" id="od_bank_account">'.PHP_EOL;
$bank_account .= '<option value="">선택하십시오.</option>';
for ($i=0; $i<count($str); $i++)
{
//$str[$i] = str_replace("\r", "", $str[$i]);
$str[$i] = trim($str[$i]);
$bank_account .= '<option value="'.$str[$i].'">'.$str[$i].'</option>'.PHP_EOL;
}
$bank_account .= '</select>'.PHP_EOL;
}
echo '<div id="settle_bank" style="display:none">';
echo '<label for="od_bank_account" class="sound_only">입금할 계좌</label>';
echo $bank_account;
echo '<br><label for="od_deposit_name">입금자명</label> ';
echo '<input type="text" name="od_deposit_name" id="od_deposit_name" size="10" maxlength="20">';
echo '</div>';
}
if ($is_kakaopay_use || $default['de_bank_use'] || $default['de_vbank_use'] || $default['de_iche_use'] || $default['de_card_use'] || $default['de_hp_use'] || $default['de_easy_pay_use'] || $default['de_inicis_lpay_use'] ) {
echo '</fieldset>';
}
if ($multi_settle == 0)
echo '<p>결제할 방법이 없습니다.<br>운영자에게 알려주시면 감사하겠습니다.</p>';
?>
</div>
</section>
<?php
$multi_settle++;
}
}
?>
<!-- } 포인트정보 입력 끝 -->
<!-- 결제정보 입력 시작 { -->
<div id="sod_frm_pay">
<h2>결제수단</h2>
<?php
if (!$default['de_card_point'])
echo '<p class="tooltip_txt"><i class="fa fa-info-circle" aria-hidden="true"></i> <strong>무통장입금</strong> 이외의 결제 수단으로 결제하시는 경우 포인트를 적립해드리지 않습니다.</p>';
$multi_settle = 0;
$checked = '';
$escrow_title = "";
if ($default['de_escrow_use']) {
$escrow_title = "에스크로<br>";
}
if ($is_kakaopay_use || $default['de_bank_use'] || $default['de_vbank_use'] || $default['de_iche_use'] || $default['de_card_use'] || $default['de_hp_use'] || $default['de_easy_pay_use'] || $default['de_inicis_lpay_use']) {
echo '<fieldset id="sod_frm_paysel">';
echo '<legend>결제방법 선택</legend>';
}
?>
<ul class="pay_way chk_box">
<li>
<?php
// 카카오페이
if($is_kakaopay_use) {
$multi_settle++;
echo '<input type="radio" id="od_settle_kakaopay" name="od_settle_case" value="KAKAOPAY" '.$checked.'> <label for="od_settle_kakaopay" class="lb_icon"><span></span><b class="kakaopay_icon">KAKAOPAY</b></label>'.PHP_EOL;
$checked = '';
}
?>
</li>
<li>
<?php
// 무통장입금 사용
if ($default['de_bank_use']) {
$multi_settle++;
echo '<input type="radio" id="od_settle_bank" name="od_settle_case" value="무통장" '.$checked.'> <label for="od_settle_bank" class="lb_icon"><span></span>무통장입금</label>'.PHP_EOL;
$checked = '';
}
?>
</li>
<li>
<?php
// 가상계좌 사용
if ($default['de_vbank_use']) {
$multi_settle++;
echo '<input type="radio" id="od_settle_vbank" name="od_settle_case" value="가상계좌" '.$checked.'> <label for="od_settle_vbank" class="lb_icon"><span></span>'.$escrow_title.'가상계좌</label>'.PHP_EOL;
$checked = '';
}
?>
</li>
<li>
<?php
// 계좌이체 사용
if ($default['de_iche_use']) {
$multi_settle++;
echo '<input type="radio" id="od_settle_iche" name="od_settle_case" value="계좌이체" '.$checked.'> <label for="od_settle_iche" class="lb_icon"><span></span>'.$escrow_title.'계좌이체</label>'.PHP_EOL;
$checked = '';
}
?>
</li>
<li>
<?php
// 휴대폰 사용
if ($default['de_hp_use']) {
$multi_settle++;
echo '<input type="radio" id="od_settle_hp" name="od_settle_case" value="휴대폰" '.$checked.'> <label for="od_settle_hp" class="lb_icon"><span></span>휴대폰</label>'.PHP_EOL;
$checked = '';
}
?>
</li>
<li>
<?php
// 신용카드 사용
if ($default['de_card_use']) {
$multi_settle++;
echo '<input type="radio" id="od_settle_card" name="od_settle_case" value="신용카드" '.$checked.'> <label for="od_settle_card" class="lb_icon"><span></span>신용카드</label>'.PHP_EOL;
$checked = '';
}
?>
</li>
<li>
<?php
// PG 간편결제
if($default['de_easy_pay_use']) {
switch($default['de_pg_service']) {
case 'lg':
$pg_easy_pay_name = 'PAYNOW';
break;
case 'inicis':
$pg_easy_pay_name = 'KPAY';
break;
default:
$pg_easy_pay_name = 'PAYCO';
break;
}
$multi_settle++;
echo '<input type="radio" id="od_settle_easy_pay" name="od_settle_case" value="간편결제" '.$checked.'> <label for="od_settle_easy_pay" class="lb_icon"><span></span><b class="'.$pg_easy_pay_name.'">'.$pg_easy_pay_name.'</b></label>'.PHP_EOL;
$checked = '';
}
?>
</li>
<li>
<?php
//이니시스 Lpay
if($default['de_inicis_lpay_use']) {
echo '<input type="radio" id="od_settle_inicislpay" data-case="lpay" name="od_settle_case" value="lpay" '.$checked.'> <label for="od_settle_inicislpay" class="lb_icon"><span></span><b class="inicis_lpay">L.pay</b></label>'.PHP_EOL;
$checked = '';
}
?>
</li>
</ul>
<?php
if ($default['de_bank_use']) {
// 은행계좌를 배열로 만든후
$str = explode("\n", trim($default['de_bank_account']));
if (count($str) <= 1)
{
$bank_account = '<input type="hidden" name="od_bank_account" value="'.$str[0].'">'.$str[0].PHP_EOL;
}
else
{
$bank_account = '<select name="od_bank_account" id="od_bank_account">'.PHP_EOL;
$bank_account .= '<option value="">선택하십시오.</option>';
for ($i=0; $i<count($str); $i++)
{
//$str[$i] = str_replace("\r", "", $str[$i]);
$str[$i] = trim($str[$i]);
$bank_account .= '<option value="'.$str[$i].'">'.$str[$i].'</option>'.PHP_EOL;
}
$bank_account .= '</select>'.PHP_EOL;
}
echo '<ul id="settle_bank" style="display:none">';
echo '<li>';
echo '<label for="od_bank_account">은행선택</label>';
echo $bank_account;
echo '</li>';
echo '<li>';
echo '<label for="od_deposit_name">입금자명</label> ';
echo '<input type="text" name="od_deposit_name" id="od_deposit_name" size="10" maxlength="20">';
echo '</li>';
echo '</ul>';
}
if ($is_kakaopay_use || $default['de_bank_use'] || $default['de_vbank_use'] || $default['de_iche_use'] || $default['de_card_use'] || $default['de_hp_use'] || $default['de_easy_pay_use'] || $default['de_inicis_lpay_use'] ) {
echo '</fieldset>';
}
if ($multi_settle == 0)
echo '<p>결제할 방법이 없습니다.<br>운영자에게 알려주시면 감사하겠습니다.</p>';
?>
</div>
<!-- } 결제 정보 입력 끝 -->
<?php
@ -716,7 +786,6 @@ if($is_kakaopay_use) {
}
?>
</div>
</div>
</form>
@ -729,6 +798,24 @@ if( $default['de_inicis_lpay_use'] ){ //이니시스 L.pay 사용시
var zipcode = "";
var form_action_url = "<?php echo $order_action_url; ?>";
function od_coupon_close(){
var $coupon_frm = jQuery("#od_coupon_frm");
if ( $coupon_frm.parent(".od_coupon_wrap").length ){
$coupon_frm.parent(".od_coupon_wrap").remove();
} else {
$coupon_frm.remove();
}
}
function cp_form_close(){
var $cp_frm = jQuery("#cp_frm");
if ( $cp_frm.parent(".od_coupon_wrap").length ){
$cp_frm.parent(".od_coupon_wrap").remove();
} else {
$cp_frm.remove();
}
}
$(function() {
var $cp_btn_el;
var $cp_row_el;
@ -736,7 +823,7 @@ $(function() {
$(".cp_btn").click(function() {
$cp_btn_el = $(this);
$cp_row_el = $(this).closest("tr");
$("#cp_frm").remove();
cp_form_close();
var it_id = $cp_btn_el.closest("tr").find("input[name^=it_id]").val();
$.post(
@ -747,7 +834,11 @@ $(function() {
}
);
});
$(document).on("click", "#cp_close", function() {
$(".od_coupon, .od_coupon_wrap").remove();
});
$(document).on("click", ".cp_apply", function() {
var $el = $(this).closest("tr");
var cp_id = $el.find("input[name='f_cp_id[]']").val();
@ -783,7 +874,7 @@ $(function() {
return false;
} else {
coupon_cancel($cp_dup_el);
$("#cp_frm").remove();
cp_form_close();
$cp_dup_el.find(".cp_btn").text("적용").focus();
$cp_dup_el.find(".cp_cancel").remove();
}
@ -801,27 +892,27 @@ $(function() {
$cp_row_el.find("input[name^=cp_price]").val(price);
calculate_total_price();
$("#cp_frm").remove();
cp_form_close();
$cp_btn_el.text("변경").focus();
if(!$cp_row_el.find(".cp_cancel").size())
$cp_btn_el.after("<button type=\"button\" class=\"cp_cancel\">취소</button>");
});
$(document).on("click", "#cp_close", function() {
$("#cp_frm").remove();
cp_form_close();
$cp_btn_el.focus();
});
$(document).on("click", ".cp_cancel", function() {
coupon_cancel($(this).closest("tr"));
calculate_total_price();
$("#cp_frm").remove();
cp_form_close();
$(this).closest("tr").find(".cp_btn").text("적용").focus();
$(this).remove();
});
$("#od_coupon_btn").click(function() {
$("#od_coupon_frm").remove();
od_coupon_close();
var $this = $(this);
var price = parseInt($("input[name=org_od_price]").val()) - parseInt($("input[name=item_coupon]").val());
if(price <= 0) {
@ -868,14 +959,14 @@ $(function() {
$("#od_cp_price").text(number_format(String(price)));
$("#sc_cp_price").text(0);
calculate_order_price();
$("#od_coupon_frm").remove();
od_coupon_close();
$("#od_coupon_btn").text("변경").focus();
if(!$("#od_coupon_cancel").size())
$("#od_coupon_btn").after("<button type=\"button\" id=\"od_coupon_cancel\" class=\"cp_cancel\">취소</button>");
});
$(document).on("click", "#od_coupon_close", function() {
$("#od_coupon_frm").remove();
od_coupon_close();
$("#od_coupon_btn").focus();
});
@ -889,7 +980,7 @@ $(function() {
$("#od_cp_price").text(0);
$("#sc_cp_price").text(0);
calculate_order_price();
$("#od_coupon_frm").remove();
od_coupon_close();
$("#od_coupon_btn").text("쿠폰적용").focus();
$(this).remove();
$("#sc_coupon_btn").text("쿠폰적용");
@ -1562,4 +1653,13 @@ $(function(){
$("#od_hope_date").datepicker({ changeMonth: true, changeYear: true, dateFormat: "yy-mm-dd", showButtonPanel: true, yearRange: "c-99:c+99", minDate: "+<?php echo (int)$default['de_hope_date_after']; ?>d;", maxDate: "+<?php echo (int)$default['de_hope_date_after'] + 6; ?>d;" });
});
<?php } ?>
$(function(){
//tooltip
$(".tooltip_icon").click(function(){
$(this).next(".tooltip").fadeIn(400);
}).mouseout(function(){
$(this).next(".tooltip").fadeOut();
});
});
</script>

View File

@ -7,8 +7,12 @@ if( $od_settle_case == 'lpay' ){
$default['de_pg_service'] = 'inicis';
}
if(($od_settle_case != '무통장' && $od_settle_case != 'KAKAOPAY') && $default['de_pg_service'] == 'lg' && !$_POST['LGD_PAYKEY'])
if(function_exists('add_order_post_log')) add_order_post_log('init');
if(($od_settle_case != '무통장' && $od_settle_case != 'KAKAOPAY') && $default['de_pg_service'] == 'lg' && !$_POST['LGD_PAYKEY']){
if(function_exists('add_order_post_log')) add_order_post_log('결제등록 요청 후 주문해 주십시오.');
alert('결제등록 요청 후 주문해 주십시오.');
}
// 장바구니가 비어있는가?
if (get_session("ss_direct"))
@ -16,8 +20,10 @@ if (get_session("ss_direct"))
else
$tmp_cart_id = get_session('ss_cart_id');
if (get_cart_count($tmp_cart_id) == 0)// 장바구니에 담기
if (get_cart_count($tmp_cart_id) == 0) { // 장바구니에 담기
if(function_exists('add_order_post_log')) add_order_post_log('장바구니가 비어 있습니다.');
alert('장바구니가 비어 있습니다.\\n\\n이미 주문하셨거나 장바구니에 담긴 상품이 없는 경우입니다.', G5_SHOP_URL.'/cart.php');
}
$error = "";
// 장바구니 상품 재고 검사
@ -44,12 +50,15 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
$error .= "{$row['ct_option']} 의 재고수량이 부족합니다. 현재고수량 : $it_stock_qty\\n\\n";
}
if($i == 0)
if($i == 0) {
if(function_exists('add_order_post_log')) add_order_post_log('장바구니가 비어 있습니다.');
alert('장바구니가 비어 있습니다.\\n\\n이미 주문하셨거나 장바구니에 담긴 상품이 없는 경우입니다.', G5_SHOP_URL.'/cart.php');
}
if ($error != "")
{
$error .= "다른 고객님께서 {$od_name}님 보다 먼저 주문하신 경우입니다. 불편을 끼쳐 죄송합니다.";
if(function_exists('add_order_post_log')) add_order_post_log($error);
alert($error);
}
@ -179,6 +188,7 @@ if($is_member) {
}
if ((int)($row['od_price'] - $tot_cp_price) !== $i_price) {
if(function_exists('add_order_post_log')) add_order_post_log('쿠폰금액 최종 계산 Error.');
die("Error.");
}
@ -221,6 +231,7 @@ if($is_member && $send_cost > 0) {
}
if ((int)($send_cost - $tot_sc_cp_price) !== (int)($i_send_cost - $i_send_coupon)) {
if(function_exists('add_order_post_log')) add_order_post_log('배송비 최종 계산 Error..');
die("Error..");
}
@ -235,8 +246,11 @@ if(!$tmp['sc_id'])
$send_cost2 = 0;
else
$send_cost2 = (int)$tmp['sc_price'];
if($send_cost2 !== $i_send_cost2)
if($send_cost2 !== $i_send_cost2){
if(function_exists('add_order_post_log')) add_order_post_log('추가배송비 최종 계산 Error...');
die("Error...");
}
// 결제포인트가 상이함
// 회원이면서 포인트사용이면
@ -257,13 +271,17 @@ if ($is_member && $config['cf_use_point'])
}
}
if (($i_temp_point > (int)$temp_point || $i_temp_point < 0) && $config['cf_use_point'])
if (($i_temp_point > (int)$temp_point || $i_temp_point < 0) && $config['cf_use_point']) {
if(function_exists('add_order_post_log')) add_order_post_log('포인트 최종 계산 Error....');
die("Error....");
}
if ($od_temp_point)
{
if ($member['mb_point'] < $od_temp_point)
if ($member['mb_point'] < $od_temp_point) {
if(function_exists('add_order_post_log')) add_order_post_log('회원님의 포인트가 부족하여 포인트로 결제 할 수 없습니다.');
alert('회원님의 포인트가 부족하여 포인트로 결제 할 수 없습니다.');
}
}
$i_price = $i_price + $i_send_cost + $i_send_cost2 - $i_temp_point - $i_send_coupon;
@ -456,6 +474,7 @@ if($tno) {
break;
}
if(function_exists('add_order_post_log')) add_order_post_log($cancel_msg);
die("Receipt Amount Error");
}
}
@ -587,7 +606,8 @@ if(!$result) {
// 관리자에게 오류 알림 메일발송
$error = 'order';
include G5_SHOP_PATH.'/ordererrormail.php';
if(function_exists('add_order_post_log')) add_order_post_log($cancel_msg);
die('<p>고객님의 주문 정보를 처리하는 중 오류가 발생해서 주문이 완료되지 않았습니다.</p><p>'.strtoupper($od_pg).'를 이용한 전자결제(신용카드, 계좌이체, 가상계좌 등)은 자동 취소되었습니다.');
}
@ -633,7 +653,8 @@ if(!$result) {
// 관리자에게 오류 알림 메일발송
$error = 'status';
include G5_SHOP_PATH.'/ordererrormail.php';
if(function_exists('add_order_post_log')) add_order_post_log($cancel_msg);
// 주문삭제
sql_query(" delete from {$g5['g5_shop_order_table']} where od_id = '$od_id' ");
@ -827,6 +848,8 @@ if($od_pg == 'inicis') {
sql_query($sql);
}
if(function_exists('add_order_post_log')) add_order_post_log('', 'delete');
// 주문번호제거
set_session('ss_order_id', '');

View File

@ -8,6 +8,8 @@ if (G5_IS_MOBILE) {
define("_ORDERINQUIRY_", true);
$order_info = array();
$request_pwd = $od_pwd;
$od_pwd = get_encrypt_string($od_pwd);
// 회원인 경우
@ -17,7 +19,19 @@ if ($is_member)
}
else if ($od_id && $od_pwd) // 비회원인 경우 주문서번호와 비밀번호가 넘어왔다면
{
$sql_common = " from {$g5['g5_shop_order_table']} where od_id = '$od_id' and od_pwd = '$od_pwd' ";
if( defined('G5_MYSQL_PASSWORD_LENGTH') && strlen($od_pwd) === G5_MYSQL_PASSWORD_LENGTH ) {
$sql_common = " from {$g5['g5_shop_order_table']} where od_id = '$od_id' and od_pwd = '$od_pwd' ";
} else {
$sql_common = " from {$g5['g5_shop_order_table']} where od_id = '$od_id' ";
$order_info = get_shop_order_data($od_id);
if (!check_password($request_pwd, $order_info['od_pwd'])) {
run_event('password_is_wrong', 'shop', $order_info);
alert('주문이 존재하지 않습니다.');
exit;
}
}
}
else // 그렇지 않다면 로그인으로 가기
{
@ -48,8 +62,15 @@ $from_record = ($page - 1) * $rows; // 시작 열을 구함
// 비회원 주문확인의 경우 바로 주문서 상세조회로 이동
if (!$is_member)
{
$sql = " select od_id, od_time, od_ip from {$g5['g5_shop_order_table']} where od_id = '$od_id' and od_pwd = '$od_pwd' ";
$row = sql_fetch($sql);
if( defined('G5_MYSQL_PASSWORD_LENGTH') && strlen($od_pwd) === G5_MYSQL_PASSWORD_LENGTH ) {
$sql = " select od_id, od_time, od_ip from {$g5['g5_shop_order_table']} where od_id = '$od_id' and od_pwd = '$od_pwd' ";
$row = sql_fetch($sql);
} else if( $order_info ){
if (check_password($request_pwd, $order_info['od_pwd'])) {
$row = $order_info;
}
}
if ($row['od_id']) {
$uid = md5($row['od_id'].$row['od_time'].$row['od_ip']);
set_session('ss_orderview_uid', $uid);
@ -63,8 +84,6 @@ include_once('./_head.php');
<!-- 주문 내역 시작 { -->
<div id="sod_v">
<p id="sod_v_info">주문서번호 링크를 누르시면 주문상세내역을 조회하실 수 있습니다.</p>
<?php
$limit = " limit $from_record, $rows ";
include "./orderinquiry.sub.php";

View File

@ -17,73 +17,68 @@ if(defined('G5_THEME_SHOP_PATH')) {
<!-- 주문 내역 목록 시작 { -->
<?php if (!$limit) { ?>총 <?php echo $cnt; ?> 건<?php } ?>
<div class="tbl_head03 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 *
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']);
<p class="tooltip_txt"><i class="fa fa-info-circle" aria-hidden="true"></i> 주문서번호 링크를 누르시면 주문상세내역을 조회하실 수 있습니다.</p>
<ul class="smb_my_od">
<?php
$sql = " select *
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']);
switch($row['od_status']) {
case '주문':
$od_status = '<span class="status_01">입금확인중</span>';
break;
case '입금':
$od_status = '<span class="status_02">입금완료</span>';
break;
case '준비':
$od_status = '<span class="status_03">상품준비중</span>';
break;
case '배송':
$od_status = '<span class="status_04">상품배송</span>';
break;
case '완료':
$od_status = '<span class="status_05">배송완료</span>';
break;
default:
$od_status = '<span class="status_06">주문취소</span>';
break;
}
?>
<li>
<div class="smb_my_od_li smb_my_od_li1">
<span class="sound_only">주문서번호</span>
<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']; ?>&amp;uid=<?php echo $uid; ?>" class="ord_num"><?php echo $row['od_id']; ?></a>
<br>
<span class="sound_only">주문일시</span>
<span class="date"><?php echo substr($row['od_time'],2,14); ?> (<?php echo get_yoil($row['od_time']); ?>)</span>
</div>
<div class="smb_my_od_li smb_my_od_li2">
<a href="<?php echo G5_SHOP_URL; ?>/orderinquiryview.php?od_id=<?php echo $row['od_id']; ?>&amp;uid=<?php echo $uid; ?>" class="ord_name"><?php echo $row['it_name']; ?>상품명입니다</a>
<br>
<span class="sound_only">주문금액</span>
<span class="cost"><?php echo display_price($row['od_cart_price'] + $row['od_send_cost'] + $row['od_send_cost2']); ?></span>
<!-- <span clsass="sound_only">입금액</span>
<?php echo display_price($row['od_receipt_price']); ?> -->
<span class="misu">(미입금액 : <?php echo display_price($row['od_misu']); ?>)</span>
</div>
<div class="smb_my_od_li smb_my_od_li3">
<span class="sound_only">상태</span>
<?php echo $od_status; ?>
</div>
</li>
<?php
}
switch($row['od_status']) {
case '주문':
$od_status = '<span class="status_01">입금확인중</span>';
break;
case '입금':
$od_status = '<span class="status_02">입금완료</span>';
break;
case '준비':
$od_status = '<span class="status_03">상품준비중</span>';
break;
case '배송':
$od_status = '<span class="status_04">상품배송</span>';
break;
case '완료':
$od_status = '<span class="status_05">배송완료</span>';
break;
default:
$od_status = '<span class="status_06">주문취소</span>';
break;
}
?>
<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']; ?>&amp;uid=<?php echo $uid; ?>"><?php echo $row['od_id']; ?></a>
</td>
<td><?php echo substr($row['od_time'],2,14); ?> (<?php echo get_yoil($row['od_time']); ?>)</td>
<td class="td_numbig"><?php echo $row['od_cart_count']; ?></td>
<td class="td_numbig text_right"><?php echo display_price($row['od_cart_price'] + $row['od_send_cost'] + $row['od_send_cost2']); ?></td>
<td class="td_numbig text_right"><?php echo display_price($row['od_receipt_price']); ?></td>
<td class="td_numbig text_right"><?php echo display_price($row['od_misu']); ?></td>
<td><?php echo $od_status; ?></td>
</tr>
<?php
}
if ($i == 0)
echo '<tr><td colspan="7" class="empty_table">주문 내역이 없습니다.</td></tr>';
?>
</tbody>
</table>
</div>
if ($i == 0)
echo '<li class="empty_table">주문 내역이 없습니다.</li>';
?>
</ul>
<!-- } 주문 내역 목록 끝 -->

View File

@ -57,9 +57,7 @@ if($od['od_pg'] == 'lg') {
<!-- 주문상세내역 시작 { -->
<div id="sod_fin">
<div id="sod_fin_no">주문번호 <strong><?php echo $od_id; ?></strong></div>
<section id="sod_fin_list">
<h2>주문하신 상품</h2>
@ -74,105 +72,104 @@ if($od['od_pg'] == 'lg') {
order by ct_id ";
$result = sql_query($sql);
?>
<div class="tbl_head03 tbl_wrap">
<table>
<thead>
<tr>
<th scope="col" rowspan="2">이미지</th>
<th scope="col" colspan="7" id="th_itname">상품명</th>
</tr>
<tr class="th_line">
<th scope="col" id="th_itopt">옵션명</th>
<th scope="col" id="th_itqty">수량</th>
<th scope="col" id="th_itprice">판매가</th>
<th scope="col" id="th_itsum">소계</th>
<th scope="col" id="th_itpt">적립포인트</th>
<th scope="col" id="th_itsd">배송비</th>
<th scope="col" id="th_itst">상태</th>
</tr>
</thead>
<tbody>
<?php
for($i=0; $row=sql_fetch_array($result); $i++) {
$image = get_it_image($row['it_id'], 70, 70);
$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);
$rowspan = sql_num_rows($res) + 1;
// 합계금액 계산
$sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price,
SUM(ct_qty) as qty
from {$g5['g5_shop_cart_table']}
where it_id = '{$row['it_id']}'
and od_id = '$od_id' ";
$sum = sql_fetch($sql);
// 배송비
switch($row['ct_send_cost'])
{
case 1:
$ct_send_cost = '착불';
break;
case 2:
$ct_send_cost = '무료';
break;
default:
$ct_send_cost = '선불';
break;
}
// 조건부무료
if($row['it_sc_type'] == 2) {
$sendcost = get_item_sendcost($row['it_id'], $sum['price'], $sum['qty'], $od_id);
if($sendcost == 0)
$ct_send_cost = '무료';
}
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'];
if($k == 0) {
?>
<tr>
<td rowspan="<?php echo $rowspan; ?>" class="td_imgsmall"><?php echo $image; ?></td>
<td headers="th_itname" colspan="7" class="td_bdno"><a href="./item.php?it_id=<?php echo $row['it_id']; ?>"><?php echo $row['it_name']; ?></a></td>
</tr>
<?php } ?>
<tr>
<td headers="th_itopt" class="td_bdno"><?php echo get_text($opt['ct_option']); ?></td>
<td headers="th_itqty" class="td_mngsmall"><?php echo number_format($opt['ct_qty']); ?></td>
<td headers="th_itprice" class="td_numbig text_right"><?php echo number_format($opt_price); ?></td>
<td headers="th_itsum" class="td_numbig text_right"><?php echo number_format($sell_price); ?></td>
<td headers="th_itpt" class="td_numbig text_right"><?php echo number_format($point); ?></td>
<td headers="th_itsd" class="td_dvr"><?php echo $ct_send_cost; ?></td>
<td headers="th_itst" class="td_mngsmall"><?php echo $opt['ct_status']; ?></td>
</tr>
<?php
$tot_point += $point;
$st_count1++;
if($opt['ct_status'] == '주문')
$st_count2++;
}
}
// 주문 상품의 상태가 모두 주문이면 고객 취소 가능
if($st_count1 > 0 && $st_count1 == $st_count2)
$custom_cancel = true;
?>
</tbody>
<table>
<thead>
<tr class="th_line">
<th scope="col" id="th_itname">상품명</th>
<th scope="col" id="th_itqty">총수량</th>
<th scope="col" id="th_itprice">판매가</th>
<th scope="col" id="th_itpt">포인트</th>
<th scope="col" id="th_itsd">배송비</th>
<th scope="col" id="th_itsum">소계</th>
<th scope="col" id="th_itst">상태</th>
</tr>
</thead>
<tbody>
<?php
for($i=0; $row=sql_fetch_array($result); $i++) {
$image = get_it_image($row['it_id'], 55, 55);
$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);
$rowspan = sql_num_rows($res) + 1;
// 합계금액 계산
$sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price,
SUM(ct_qty) as qty
from {$g5['g5_shop_cart_table']}
where it_id = '{$row['it_id']}'
and od_id = '$od_id' ";
$sum = sql_fetch($sql);
// 배송비
switch($row['ct_send_cost'])
{
case 1:
$ct_send_cost = '착불';
break;
case 2:
$ct_send_cost = '무료';
break;
default:
$ct_send_cost = '선불';
break;
}
// 조건부무료
if($row['it_sc_type'] == 2) {
$sendcost = get_item_sendcost($row['it_id'], $sum['price'], $sum['qty'], $od_id);
if($sendcost == 0)
$ct_send_cost = '무료';
}
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'];
if($k == 0) {
?>
<?php } ?>
<tr>
<td headers="th_itopt" class="td_prd">
<div class="sod_img"><?php echo $image; ?></div>
<div class="sod_name">
<a href="<?php echo shop_item_url($row['it_id']); ?>"><?php echo $row['it_name']; ?></a><br>
<div class="sod_opt"><?php echo get_text($opt['ct_option']); ?></div>
</div>
</td>
<td headers="th_itqty" class="td_mngsmall"><?php echo number_format($opt['ct_qty']); ?></td>
<td headers="th_itprice" class="td_numbig text_right"><?php echo number_format($opt_price); ?></td>
<td headers="th_itpt" class="td_numbig text_right"><?php echo number_format($point); ?></td>
<td headers="th_itsd" class="td_dvr"><?php echo $ct_send_cost; ?></td>
<td headers="th_itsum" class="td_numbig text_right"><?php echo number_format($sell_price); ?></td>
<td headers="th_itst" class="td_mngsmall"><?php echo $opt['ct_status']; ?></td>
</tr>
<?php
$tot_point += $point;
$st_count1++;
if($opt['ct_status'] == '주문')
$st_count2++;
}
}
// 주문 상품의 상태가 모두 주문이면 고객 취소 가능
if($st_count1 > 0 && $st_count1 == $st_count2)
$custom_cancel = true;
?>
</tbody>
</table>
</div>
@ -195,7 +192,6 @@ if($od['od_pg'] == 'lg') {
<button type="button" id="sod_sts_explan_close" class="btn_frmline">상태설명닫기</button>
</div>
</div>
</section>
<div class="sod_left">
<h2>결제/배송 정보</h2>
@ -260,204 +256,13 @@ if($od['od_pg'] == 'lg') {
} else if($od['od_settle_case'] == '가상계좌' || $od['od_settle_case'] == '계좌이체') {
$app_no_subj = '거래번호';
$app_no = $od['od_tno'];
if( function_exists('shop_is_taxsave') && $misu_price == 0 && shop_is_taxsave($od, true) === 2 ){
$disp_receipt = true;
}
}
?>
<section id="sod_fin_pay">
<h3>결제정보</h3>
<div class="tbl_head01 tbl_wrap">
<table>
<tbody>
<tr>
<th scope="row">주문번호</th>
<td><?php echo $od_id; ?></td>
</tr>
<tr>
<th scope="row">주문일시</th>
<td><?php echo $od['od_time']; ?></td>
</tr>
<tr>
<th scope="row">결제방식</th>
<td><?php echo ($easy_pay_name ? $easy_pay_name.'('.$od['od_settle_case'].')' : check_pay_name_replace($od['od_settle_case']) ); ?></td>
</tr>
<tr>
<th scope="row">결제금액</th>
<td><?php echo $od_receipt_price; ?></td>
</tr>
<?php
if($od['od_receipt_price'] > 0)
{
?>
<tr>
<th scope="row">결제일시</th>
<td><?php echo $od['od_receipt_time']; ?></td>
</tr>
<?php
}
// 승인번호, 휴대폰번호, 거래번호
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 get_text($od['od_deposit_name']); ?></td>
</tr>
<tr>
<th scope="row">입금계좌</th>
<td><?php echo get_text($od['od_bank_account']); ?></td>
</tr>
<?php
}
if($disp_receipt) {
?>
<tr>
<th scope="row">영수증</th>
<td>
<?php
if($od['od_settle_case'] == '휴대폰')
{
if($od['od_pg'] == 'lg') {
require_once G5_SHOP_PATH.'/settle_lg.inc.php';
$LGD_TID = $od['od_tno'];
$LGD_MERTKEY = $config['cf_lg_mert_key'];
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
$hp_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
} else if($od['od_pg'] == 'inicis') {
$hp_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/mCmReceipt_head.jsp?noTid='.$od['od_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
} else {
$hp_receipt_script = 'window.open(\''.G5_BILL_RECEIPT_URL.'mcash_bill&tno='.$od['od_tno'].'&order_no='.$od['od_id'].'&trade_mony='.$od['od_receipt_price'].'\', \'winreceipt\', \'width=500,height=690,scrollbars=yes,resizable=yes\');';
}
?>
<a href="javascript:;" onclick="<?php echo $hp_receipt_script; ?>">영수증 출력</a>
<?php
}
if($od['od_settle_case'] == '신용카드' || is_inicis_order_pay($od['od_settle_case']) || (shop_is_taxsave($od, true) && $misu_price == 0) )
{
if($od['od_pg'] == 'lg') {
require_once G5_SHOP_PATH.'/settle_lg.inc.php';
$LGD_TID = $od['od_tno'];
$LGD_MERTKEY = $config['cf_lg_mert_key'];
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
$card_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
} else if($od['od_pg'] == 'inicis') {
$card_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/mCmReceipt_head.jsp?noTid='.$od['od_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
} else {
$card_receipt_script = 'window.open(\''.G5_BILL_RECEIPT_URL.'card_bill&tno='.$od['od_tno'].'&order_no='.$od['od_id'].'&trade_mony='.$od['od_receipt_price'].'\', \'winreceipt\', \'width=470,height=815,scrollbars=yes,resizable=yes\');';
}
?>
<a href="javascript:;" onclick="<?php echo $card_receipt_script; ?>">영수증 출력</a>
<?php
}
if($od['od_settle_case'] == 'KAKAOPAY')
{
$card_receipt_script = 'window.open(\'https://mms.cnspay.co.kr/trans/retrieveIssueLoader.do?TID='.$od['od_tno'].'&type=0\', \'popupIssue\', \'toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=420,height=540\');';
?>
<a href="javascript:;" onclick="<?php echo $card_receipt_script; ?>">영수증 출력</a>
<?php
}
?>
</td>
</tr>
<?php
}
if ($od['od_receipt_point'] > 0)
{
?>
<tr>
<th scope="row">포인트사용</th>
<td><?php echo display_point($od['od_receipt_point']); ?></td>
</tr>
<?php
}
if ($od['od_refund_price'] > 0)
{
?>
<tr>
<th scope="row">환불 금액</th>
<td><?php echo display_price($od['od_refund_price']); ?></td>
</tr>
<?php
}
// 현금영수증 발급을 사용하는 경우에만
if (function_exists('shop_is_taxsave') && shop_is_taxsave($od)) {
// 미수금이 없고 현금일 경우에만 현금영수증을 발급 할 수 있습니다.
if ($misu_price == 0 && $od['od_receipt_price'] && ($od['od_settle_case'] == '무통장' || $od['od_settle_case'] == '계좌이체' || $od['od_settle_case'] == '가상계좌')) {
?>
<tr>
<th scope="row">현금영수증</th>
<td>
<?php
if ($od['od_cash'])
{
if($od['od_pg'] == 'lg') {
require_once G5_SHOP_PATH.'/settle_lg.inc.php';
switch($od['od_settle_case']) {
case '계좌이체':
$trade_type = 'BANK';
break;
case '가상계좌':
$trade_type = 'CAS';
break;
default:
$trade_type = 'CR';
break;
}
$cash_receipt_script = 'javascript:showCashReceipts(\''.$LGD_MID.'\',\''.$od['od_id'].'\',\''.$od['od_casseqno'].'\',\''.$trade_type.'\',\''.$CST_PLATFORM.'\');';
} else if($od['od_pg'] == 'inicis') {
$cash = unserialize($od['od_cash_info']);
$cash_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/Cash_mCmReceipt.jsp?noTid='.$cash['TID'].'&clpaymethod=22\',\'showreceipt\',\'width=380,height=540,scrollbars=no,resizable=no\');';
} else {
require_once G5_SHOP_PATH.'/settle_kcp.inc.php';
$cash = unserialize($od['od_cash_info']);
$cash_receipt_script = 'window.open(\''.G5_CASH_RECEIPT_URL.$default['de_kcp_mid'].'&orderid='.$od_id.'&bill_yn=Y&authno='.$cash['receipt_no'].'\', \'taxsave_receipt\', \'width=360,height=647,scrollbars=0,menus=0\');';
}
?>
<a href="javascript:;" onclick="<?php echo $cash_receipt_script; ?>" class="btn_frmline">현금영수증 확인하기</a>
<?php
}
else
{
?>
<a href="javascript:;" onclick="window.open('<?php echo G5_SHOP_URL; ?>/taxsave.php?od_id=<?php echo $od_id; ?>', 'taxsave', 'width=550,height=400,scrollbars=1,menus=0');" class="btn_frmline">현금영수증을 발급하시려면 클릭하십시오.</a>
<?php } ?>
</td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
</section>
<section id="sod_fin_orderer">
<h3>주문하신 분</h3>
@ -541,43 +346,33 @@ if($od['od_pg'] == 'lg') {
<div class="tbl_head01 tbl_wrap">
<table>
<tbody>
<?php
if ($od['od_invoice'] && $od['od_delivery_company'])
{
?>
<tr>
<th scope="row">배송회사</th>
<td><?php echo $od['od_delivery_company']; ?> <?php echo get_delivery_inquiry($od['od_delivery_company'], $od['od_invoice'], 'dvr_link'); ?></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>
<?php
}
else
{
?>
<tr>
<td class="empty_table">아직 배송하지 않았거나 배송정보를 입력하지 못하였습니다.</td>
</tr>
<?php
}
?>
</tbody>
<tbody>
<?php if ($od['od_invoice'] && $od['od_delivery_company']) { ?>
<tr>
<th scope="row">배송회사</th>
<td><?php echo $od['od_delivery_company']; ?> <?php echo get_delivery_inquiry($od['od_delivery_company'], $od['od_invoice'], 'dvr_link'); ?></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>
<?php } else { ?>
<tr>
<td class="empty_table">아직 배송하지 않았거나 배송정보를 입력하지 못하였습니다.</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</section>
</div>
<div class="sod_right">
<ul id="sod_bsk_tot">
<ul id="sod_bsk_tot2">
<li class="sod_bsk_dvr">
<span>주문총액</span>
<strong><?php echo number_format($od['od_cart_price']); ?> 원</strong>
@ -586,28 +381,24 @@ if($od['od_pg'] == 'lg') {
<li class="sod_bsk_dvr">
<span>개별상품 쿠폰할인</span>
<strong><?php echo number_format($od['od_cart_coupon']); ?> 원</strong>
</li>
<?php } ?>
<?php if($od['od_coupon'] > 0) { ?>
<li class="sod_bsk_dvr">
<span>주문금액 쿠폰할인</span>
<strong><?php echo number_format($od['od_coupon']); ?> 원</strong>
</li>
<?php } ?>
<?php if ($od['od_send_cost'] > 0) { ?>
<li class="sod_bsk_dvr">
<span>배송비</span>
<strong><?php echo number_format($od['od_send_cost']); ?> 원</strong>
</li>
<?php } ?>
<?php if($od['od_send_coupon'] > 0) { ?>
<li class="sod_bsk_dvr">
<span>배송비 쿠폰할인</span>
<strong><?php echo number_format($od['od_send_coupon']); ?> 원</strong>
</li>
<?php } ?>
<?php if ($od['od_send_cost2'] > 0) { ?>
@ -619,8 +410,7 @@ if($od['od_pg'] == 'lg') {
<?php if ($od['od_cancel_price'] > 0) { ?>
<li class="sod_bsk_dvr">
<span>취소금액</span>
<strong><?php echo number_format($od['od_cancel_price']); ?> 원</strong>
<strong><?php echo number_format($od['od_cancel_price']); ?> 원</strong>
</li>
<?php } ?>
<li class="sod_bsk_cnt">
@ -631,57 +421,248 @@ if($od['od_pg'] == 'lg') {
<span>적립포인트</span>
<strong><?php echo number_format($tot_point); ?> 점</strong>
</li>
<li class="sod_fin_tot"><span>총 구매액</span><strong><?php echo display_price($tot_price); ?></strong></li>
<?php
if ($misu_price > 0) {
echo '<li class="sod_fin_tot">';
echo '<span>미결제액</span>'.PHP_EOL;
echo '<strong>'.display_price($misu_price).'</strong>';
echo '</li>';
}
?>
<li id="alrdy" class="sod_fin_tot">
<span>결제액</span>
<strong><?php echo $wanbul; ?></strong>
<?php if( $od['od_receipt_point'] ){ //포인트로 결제한 내용이 있으면 ?>
<div>
<p><span class="title">포인트 결제</span><?php echo number_format($od['od_receipt_point']); ?>점</p>
<p><span class="title">실결제</span><?php echo number_format($od['od_receipt_price']); ?>원</p>
</div>
<?php } ?>
</li>
</ul>
<section id="sod_fin_tot">
<h2>결제합계</h2>
<section id="sod_fin_pay">
<h3>결제정보</h3>
<ul>
<li>
총 구매액
<strong><?php echo display_price($tot_price); ?></strong>
</li>
<?php
if ($misu_price > 0) {
echo '<li>';
echo '미결제액'.PHP_EOL;
echo '<strong>'.display_price($misu_price).'</strong>';
echo '</li>';
<li>
<strong>주문번호</strong>
<span><?php echo $od_id; ?></span>
</li>
<li>
<strong>주문일시</strong>
<span><?php echo $od['od_time']; ?></span>
</li>
<li>
<strong>결제방식</strong>
<span><?php echo ($easy_pay_name ? $easy_pay_name.'('.$od['od_settle_case'].')' : check_pay_name_replace($od['od_settle_case']) ); ?></span>
</li>
<li>
<strong>결제금액</strong>
<span><?php echo $od_receipt_price; ?></span>
</li>
<?php
if($od['od_receipt_price'] > 0)
{
?>
<li>
<strong>결제일시</strong>
<span><?php echo $od['od_receipt_time']; ?></span>
</li>
<?php
}
// 승인번호, 휴대폰번호, 거래번호
if($app_no_subj)
{
?>
<li>
<strong><?php echo $app_no_subj; ?></strong>
<span><?php echo $app_no; ?></span>
</li>
<?php
}
// 계좌정보
if($disp_bank)
{
?>
<li>
<strong>입금자명</strong>
<span><?php echo get_text($od['od_deposit_name']); ?></span>
</li>
<li>
<strong>입금계좌</strong>
<span><?php echo get_text($od['od_bank_account']); ?></span>
</li>
<?php
}
if($disp_receipt) {
?>
<li>
<strong>영수증</strong>
<span>
<?php
if($od['od_settle_case'] == '휴대폰')
{
if($od['od_pg'] == 'lg') {
require_once G5_SHOP_PATH.'/settle_lg.inc.php';
$LGD_TID = $od['od_tno'];
$LGD_MERTKEY = $config['cf_lg_mert_key'];
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
$hp_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
} else if($od['od_pg'] == 'inicis') {
$hp_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/mCmReceipt_head.jsp?noTid='.$od['od_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
} else {
$hp_receipt_script = 'window.open(\''.G5_BILL_RECEIPT_URL.'mcash_bill&tno='.$od['od_tno'].'&order_no='.$od['od_id'].'&trade_mony='.$od['od_receipt_price'].'\', \'winreceipt\', \'width=500,height=690,scrollbars=yes,resizable=yes\');';
}
?>
<a href="javascript:;" onclick="<?php echo $hp_receipt_script; ?>">영수증 출력</a>
<?php
}
if($od['od_settle_case'] == '신용카드' || is_inicis_order_pay($od['od_settle_case']) || (shop_is_taxsave($od, true) && $misu_price == 0) )
{
if($od['od_pg'] == 'lg') {
require_once G5_SHOP_PATH.'/settle_lg.inc.php';
$LGD_TID = $od['od_tno'];
$LGD_MERTKEY = $config['cf_lg_mert_key'];
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
$card_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
} else if($od['od_pg'] == 'inicis') {
$card_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/mCmReceipt_head.jsp?noTid='.$od['od_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
} else {
$card_receipt_script = 'window.open(\''.G5_BILL_RECEIPT_URL.'card_bill&tno='.$od['od_tno'].'&order_no='.$od['od_id'].'&trade_mony='.$od['od_receipt_price'].'\', \'winreceipt\', \'width=470,height=815,scrollbars=yes,resizable=yes\');';
}
?>
<a href="javascript:;" onclick="<?php echo $card_receipt_script; ?>">영수증 출력</a>
<?php
}
if($od['od_settle_case'] == 'KAKAOPAY')
{
$card_receipt_script = 'window.open(\'https://mms.cnspay.co.kr/trans/retrieveIssueLoader.do?TID='.$od['od_tno'].'&type=0\', \'popupIssue\', \'toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=420,height=540\');';
?>
<a href="javascript:;" onclick="<?php echo $card_receipt_script; ?>">영수증 출력</a>
<?php
}
?>
</span>
</li>
<?php
}
if ($od['od_receipt_point'] > 0)
{
?>
<li>
<strong>포인트사용</strong>
<span><?php echo display_point($od['od_receipt_point']); ?></span>
</li>
<?php
}
if ($od['od_refund_price'] > 0)
{
?>
<li>
<strong>환불 금액</strong>
<span><?php echo display_price($od['od_refund_price']); ?></span>
</li>
<?php
}
// 현금영수증 발급을 사용하는 경우에만
if (function_exists('shop_is_taxsave') && shop_is_taxsave($od)) {
// 미수금이 없고 현금일 경우에만 현금영수증을 발급 할 수 있습니다.
if ($misu_price == 0 && $od['od_receipt_price'] && ($od['od_settle_case'] == '무통장' || $od['od_settle_case'] == '계좌이체' || $od['od_settle_case'] == '가상계좌')) {
?>
<li>
<strong class="letter-2px">현금영수증</strong>
<span>
<?php
if ($od['od_cash'])
{
if($od['od_pg'] == 'lg') {
require_once G5_SHOP_PATH.'/settle_lg.inc.php';
switch($od['od_settle_case']) {
case '계좌이체':
$trade_type = 'BANK';
break;
case '가상계좌':
$trade_type = 'CAS';
break;
default:
$trade_type = 'CR';
break;
}
$cash_receipt_script = 'javascript:showCashReceipts(\''.$LGD_MID.'\',\''.$od['od_id'].'\',\''.$od['od_casseqno'].'\',\''.$trade_type.'\',\''.$CST_PLATFORM.'\');';
} else if($od['od_pg'] == 'inicis') {
$cash = unserialize($od['od_cash_info']);
$cash_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/Cash_mCmReceipt.jsp?noTid='.$cash['TID'].'&clpaymethod=22\',\'showreceipt\',\'width=380,height=540,scrollbars=no,resizable=no\');';
} else {
require_once G5_SHOP_PATH.'/settle_kcp.inc.php';
$cash = unserialize($od['od_cash_info']);
$cash_receipt_script = 'window.open(\''.G5_CASH_RECEIPT_URL.$default['de_kcp_mid'].'&orderid='.$od_id.'&bill_yn=Y&authno='.$cash['receipt_no'].'\', \'taxsave_receipt\', \'width=360,height=647,scrollbars=0,menus=0\');';
}
?>
<a href="javascript:;" onclick="<?php echo $cash_receipt_script; ?>" class="btn_frmline">현금영수증 확인하기</a>
<?php
}
else
{
?>
<a href="javascript:;" onclick="window.open('<?php echo G5_SHOP_URL; ?>/taxsave.php?od_id=<?php echo $od_id; ?>', 'taxsave', 'width=550,height=400,scrollbars=1,menus=0');" class="btn_frmline is-long-text">현금영수증을 발급하시려면 클릭하십시오.</a>
<?php } ?>
</span>
</li>
<?php
}
?>
<li id="alrdy">
결제액
<strong><?php echo $wanbul; ?></strong>
<?php if( $od['od_receipt_point'] ){ //포인트로 결제한 내용이 있으면 ?>
<div class="right">
<p><span class="title"><i class="fa fa-angle-right" aria-hidden="true"></i> 포인트 결제</span><?php echo number_format($od['od_receipt_point']); ?> 점</p>
<p><span class="title"><i class="fa fa-angle-right" aria-hidden="true"></i> 실결제</span><?php echo number_format($od['od_receipt_price']); ?> 원</p>
</div>
<?php } ?>
</li>
}
?>
</ul>
</section>
<section id="sod_fin_cancel">
<h2>주문취소</h2>
<?php
// 취소한 내역이 없다면
if ($cancel_price == 0) {
if ($custom_cancel) {
?>
<button type="button" onclick="document.getElementById('sod_fin_cancelfrm').style.display='block';">주문 취소하기</button>
<button type="button" class="sod_fin_c_btn">주문 취소하기</button>
<div id="sod_cancel_pop">
<div id="sod_fin_cancelfrm">
<h2>주문취소</h2>
<form method="post" action="./orderinquirycancel.php" onsubmit="return fcancel_check(this);">
<input type="hidden" name="od_id" value="<?php echo $od['od_id']; ?>">
<input type="hidden" name="token" value="<?php echo $token; ?>">
<label for="cancel_memo" class="sound_only">취소사유</label>
<input type="text" name="cancel_memo" id="cancel_memo" required class="frm_input required" size="40" maxlength="100" placeholder="취소사유">
<input type="submit" value="확인" class="btn_frmline">
</form>
<button class="sod_cls_btn"><span class="sound_only">닫기</span><i class="fa fa-times" aria-hidden="true"></i></button>
</div>
<div class="sod_fin_bg"></div>
</div>
<script>
$(function (){
$(".sod_fin_c_btn").on("click", function() {
$("#sod_cancel_pop").show();
});
$(".sod_cls_btn").on("click", function() {
$("#sod_cancel_pop").hide();
});
});
</script>
<div id="sod_fin_cancelfrm">
<form method="post" action="./orderinquirycancel.php" onsubmit="return fcancel_check(this);">
<input type="hidden" name="od_id" value="<?php echo $od['od_id']; ?>">
<input type="hidden" name="token" value="<?php echo $token; ?>">
<label for="cancel_memo" class="sound_only">취소사유</label>
<input type="text" name="cancel_memo" id="cancel_memo" required class="frm_input required" size="40" maxlength="100" placeholder="취소사유">
<input type="submit" value="확인" class="btn_frmline">
</form>
</div>
<?php
}
} else {
@ -691,9 +672,6 @@ if($od['od_pg'] == 'lg') {
</section>
</div>
<?php if ($od['od_settle_case'] == '가상계좌' && $od['od_misu'] > 0 && $default['de_card_test'] && $is_admin && $od['od_pg'] == 'kcp') {
preg_match("/\s{1}([^\s]+)\s?/", $od['od_bank_account'], $matchs);
$deposit_no = trim($matchs[1]);
@ -774,7 +752,7 @@ function fcancel_check(f)
}
return true;
}
}
</script>
<?php

View File

@ -8,8 +8,7 @@ if($is_guest)
$pattern = '#[/\'\"%=*\#\(\)\|\+\&\!\$~\{\}\[\]`;:\?\^\,]#';
$it_id = preg_replace($pattern, '', $_POST['it_id']);
$sw_direct = $_POST['sw_direct'];
$sql = " select it_id, ca_id, ca_id2, ca_id3 from {$g5['g5_shop_item_table']} where it_id = '$it_id' ";
$it = sql_fetch($sql);
$it = get_shop_item($it_id, true);
// 상품 총 금액
if($sw_direct)
@ -41,59 +40,62 @@ $count = sql_num_rows($result);
?>
<!-- 쿠폰 선택 시작 { -->
<div id="cp_frm" class="od_coupon">
<div class="od_coupon_wrap">
<div id="cp_frm" class="od_coupon">
<h3>쿠폰선택</h3>
<?php if($count > 0) { ?>
<div class="tbl_head02 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'];
}
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">적용</button></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<?php
} else {
echo '<div class="empty_list">사용할 수 있는 쿠폰이 없습니다.</div>';
}
?>
<div class="btn_confirm">
<button type="button" id="cp_close" class="btn_close"><i class="fa fa-times" aria-hidden="true"></i><span class="sound_only">닫기</span></button>
<?php if($count > 0) { ?>
<div class="tbl_head02 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'];
}
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">적용</button></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<?php
} else {
echo '<div class="empty_list">사용할 수 있는 쿠폰이 없습니다.</div>';
}
?>
<div class="btn_confirm">
<button type="button" id="cp_close" class="btn_close"><i class="fa fa-times" aria-hidden="true"></i><span class="sound_only">닫기</span></button>
</div>
</div>
</div>
<!-- } 쿠폰 선택 끝 -->

View File

@ -18,10 +18,10 @@ include_once('./_head.php');
$list_file = G5_SHOP_SKIN_PATH.'/personalpay.skin.php';
if (file_exists($list_file)) {
$list_mod = 4;
$list_mod = 5;
$list_row = 5;
$img_width = 230;
$img_height = 230;
$img_width = 225;
$img_height = 225;
$sql_common = " from {$g5['g5_shop_personalpay_table']}
where pp_use = '1'

View File

@ -15,39 +15,44 @@ require_once(G5_SHOP_PATH.'/'.$default['de_pg_service'].'/orderform.1.php');
require_once(G5_SHOP_PATH.'/'.$default['de_pg_service'].'/orderform.2.php');
?>
<section id="sod_frm_pay" class="pesonal sod_left ">
<section class="pesonal sod_left"><!-- id="sod_frm_pay" -->
<h2>개인결제정보</h2>
<div class="tbl_frm01 tbl_wrap ">
<div class="tbl_frm01 tbl_wrap">
<table>
<tbody>
<?php if(trim($pp['pp_content'])) { ?>
<tr>
<th>상세내용</th>
<td><?php echo conv_content($pp['pp_content'], 0); ?></td>
<th scope="col" colspan="2">상세내용</th>
</tr>
<tr>
<td colspan="2"><?php echo conv_content($pp['pp_content'], 0); ?></td>
</tr>
<?php } ?>
<tr>
<th>결제금액</th>
<td><?php echo display_price($pp['pp_price']); ?></td>
<th scope="col" colspan="2">결제금액</th>
</tr>
<tr>
<td colspan="2"><?php echo display_price($pp['pp_price']); ?></td>
</tr>
<tr>
<th scope="col"><label for="pp_name">이름<strong class="sound_only"> 필수</strong></label></th>
<th scope="col"><label for="pp_hp">휴대폰</label></th>
</tr>
<tr>
<th scope="row"><label for="pp_name">이름<strong class="sound_only"> 필수</strong></label></th>
<td><input type="text" name="pp_name" value="<?php echo get_text($pp['pp_name']); ?>" id="pp_name" required class="required frm_input"></td>
</tr>
<tr>
<th scope="row"><label for="pp_email">이메일<strong class="sound_only"> 필수</strong></label></th>
<td><input type="text" name="pp_email" value="<?php echo $member['mb_email']; ?>" id="pp_email" required class="required frm_input" size="30"></td>
</tr>
<tr>
<th scope="row"><label for="pp_hp">휴대폰</label></th>
<td><input type="text" name="pp_hp" value="<?php echo get_text($member['mb_hp']); ?>" id="pp_hp" required class="required frm_input"></td>
</tr>
<tr>
<th scope="col" colspan="2"><label for="pp_email">이메일<strong class="sound_only"> 필수</strong></label></th>
</tr>
<tr>
<td colspan="2"><input type="text" name="pp_email" value="<?php echo $member['mb_email']; ?>" id="pp_email" required class="required frm_input" size="30"></td>
</tr>
</tbody>
</table>
</div>
</section>
<div class="sod_right" id="personal_pay">
@ -65,35 +70,55 @@ require_once(G5_SHOP_PATH.'/'.$default['de_pg_service'].'/orderform.1.php');
echo '<fieldset id="sod_frm_paysel">';
echo '<legend>결제방법 선택</legend>';
}
?>
<ul class="pay_way chk_box">
<li>
<?php
// 가상계좌 사용
if ($default['de_vbank_use']) {
$multi_settle++;
echo '<input type="radio" id="pp_settle_vbank" name="pp_settle_case" value="가상계좌" '.$checked.'> <label for="pp_settle_vbank" class="lb_icon"><span></span>'.$escrow_title.'가상계좌</label>'.PHP_EOL;
$checked = '';
}
?>
</li>
<li>
<?php
// 계좌이체 사용
if ($default['de_iche_use']) {
$multi_settle++;
echo '<input type="radio" id="pp_settle_iche" name="pp_settle_case" value="계좌이체" '.$checked.'> <label for="pp_settle_iche" class="lb_icon"><span></span>'.$escrow_title.'계좌이체</label>'.PHP_EOL;
$checked = '';
}
?>
</li>
<li>
<?php
// 휴대폰 사용
if ($default['de_hp_use']) {
$multi_settle++;
echo '<input type="radio" id="pp_settle_hp" name="pp_settle_case" value="휴대폰" '.$checked.'> <label for="pp_settle_hp" class="lb_icon"><span></span>휴대폰</label>'.PHP_EOL;
$checked = '';
}
?>
</li>
<li>
<?php
// 신용카드 사용
if ($default['de_card_use']) {
$multi_settle++;
echo '<input type="radio" id="pp_settle_card" name="pp_settle_case" value="신용카드" '.$checked.'> <label for="pp_settle_card" class="lb_icon"><span></span>신용카드</label>'.PHP_EOL;
$checked = '';
}
?>
</li>
</ul>
// 가상계좌 사용
if ($default['de_vbank_use']) {
$multi_settle++;
echo '<input type="radio" id="pp_settle_vbank" name="pp_settle_case" value="가상계좌" '.$checked.'><label for="pp_settle_vbank" class="lb_icon vbank_icon">'.$escrow_title.'가상계좌</label>'.PHP_EOL;
$checked = '';
}
// 계좌이체 사용
if ($default['de_iche_use']) {
$multi_settle++;
echo '<input type="radio" id="pp_settle_iche" name="pp_settle_case" value="계좌이체" '.$checked.'><label for="pp_settle_iche" class="lb_icon vbank_icon">'.$escrow_title.'계좌이체</label>'.PHP_EOL;
$checked = '';
}
// 휴대폰 사용
if ($default['de_hp_use']) {
$multi_settle++;
echo '<input type="radio" id="pp_settle_hp" name="pp_settle_case" value="휴대폰" '.$checked.'> <label for="pp_settle_hp" class="lb_icon hp_icon">휴대폰</label>'.PHP_EOL;
$checked = '';
}
// 신용카드 사용
if ($default['de_card_use']) {
$multi_settle++;
echo '<input type="radio" id="pp_settle_card" name="pp_settle_case" value="신용카드" '.$checked.'> <label for="pp_settle_card" class="lb_icon card_icon">신용카드</label>'.PHP_EOL;
$checked = '';
}
<?php
if ($default['de_vbank_use'] || $default['de_iche_use'] || $default['de_card_use'] || $default['de_hp_use']) {
echo '</fieldset>';
@ -113,11 +138,8 @@ require_once(G5_SHOP_PATH.'/'.$default['de_pg_service'].'/orderform.1.php');
}
?>
</div>
</form>
<script>
function forderform_check(f)
{

View File

@ -100,7 +100,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
$str .= "{$lt}mapid{$gt}{$row['it_id']}".PHP_EOL;
$str .= "{$lt}price{$gt}{$row['it_price']}".PHP_EOL;
$str .= "{$lt}pname{$gt}{$row['it_name']}".PHP_EOL;
$str .= "{$lt}pgurl{$gt}$shop_url/item.php?it_id={$row['it_id']}".PHP_EOL;
$str .= "{$lt}pgurl{$gt}".shop_item_url($row['it_id']).PHP_EOL;
$str .= "{$lt}igurl{$gt}$img_url".PHP_EOL;
$str .= "{$lt}cate1{$gt}$cate1".PHP_EOL;
$str .= "{$lt}caid1{$gt}$caid1".PHP_EOL;

View File

@ -109,7 +109,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
$str .= "{$lt}class{$gt}$class".PHP_EOL;
$str .= "{$lt}utime{$gt}$utime".PHP_EOL;
$str .= "{$lt}pname{$gt}{$row['it_name']}".PHP_EOL;
$str .= "{$lt}pgurl{$gt}$shop_url/item.php?it_id={$row['it_id']}".PHP_EOL;
$str .= "{$lt}pgurl{$gt}".shop_item_url($row['it_id']).PHP_EOL;
$str .= "{$lt}igurl{$gt}$img_url".PHP_EOL;
$str .= "{$lt}cate1{$gt}$cate1".PHP_EOL;
$str .= "{$lt}caid1{$gt}$caid1".PHP_EOL;

View File

@ -79,7 +79,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
// 포인트
$it_point = get_item_point($row);
$item_link = G5_SHOP_URL.'/item.php?it_id='.$row['it_id'];
$item_link = shop_item_url($row['it_id']);
echo "\n{$row['it_id']}{$tab}{$row['it_name']}{$tab}{$row['it_price']}{$tab}{$item_link}{$tab}{$img_url}{$tab}{$cate1}{$tab}{$cate2}{$tab}{$cate3}{$tab}{$cate4}{$tab}{$row['it_model']}{$tab}{$row['it_brand']}{$tab}{$row['it_maker']}{$tab}{$row['it_origin']}{$tab}{$it_point}{$tab}{$delivery}";
}

View File

@ -79,7 +79,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
// 포인트
$it_point = get_item_point($row);
$item_link = G5_SHOP_URL.'/item.php?it_id='.$row['it_id'];
$item_link = shop_item_url($row['it_id']);
// 상태
$class = 'U';

View File

@ -1,6 +1,8 @@
<?php
include_once('./_common.php');
define('IS_SHOP_SEARCH', true);
if (G5_IS_MOBILE) {
include_once(G5_MSHOP_PATH.'/search.php');
return;

View File

@ -13,164 +13,253 @@ include_once(G5_LIB_PATH.'/visit.lib.php');
include_once(G5_LIB_PATH.'/connect.lib.php');
include_once(G5_LIB_PATH.'/popular.lib.php');
include_once(G5_LIB_PATH.'/latest.lib.php');
?>
add_javascript('<script src="'.G5_JS_URL.'/owlcarousel/owl.carousel.min.js"></script>', 10);
add_stylesheet('<link rel="stylesheet" href="'.G5_JS_URL.'/owlcarousel/owl.carousel.css">', 0);
?>
<!-- 상단 시작 { -->
<div id="hd">
<h1 id="hd_h1"><?php echo $g5['title'] ?></h1>
<div id="skip_to_container"><a href="#container">본문 바로가기</a></div>
<?php if(defined('_INDEX_')) { // index에서만 실행
include G5_BBS_PATH.'/newwin.inc.php'; // 팝업레이어
} ?>
<div id="tnb">
<h3>회원메뉴</h3>
<ul>
} ?>
<div id="tnb">
<div class="inner">
<?php if(defined('G5_COMMUNITY_USE') == false || G5_COMMUNITY_USE) { ?>
<li class="tnb_left tnb_shop"><a href="<?php echo G5_SHOP_URL; ?>/"><i class="fa fa-shopping-bag" aria-hidden="true"></i> 쇼핑몰</a></li>
<li class="tnb_left tnb_community"><a href="<?php echo G5_URL; ?>/"><i class="fa fa-home" aria-hidden="true"></i> 커뮤니티</a></li>
<ul id="hd_define">
<li><a href="<?php echo G5_URL ?>/">커뮤니티</a></li>
<li class="active"><a href="<?php echo G5_SHOP_URL ?>/">쇼핑몰</a></li>
</ul>
<?php } ?>
<li class="tnb_cart"><a href="<?php echo G5_SHOP_URL; ?>/cart.php"><i class="fa fa-shopping-cart" aria-hidden="true"></i> 장바구니</a></li>
<li><a href="<?php echo G5_SHOP_URL; ?>/mypage.php">마이페이지</a></li>
<?php if ($is_member) { ?>
<li><a href="<?php echo G5_BBS_URL; ?>/member_confirm.php?url=register_form.php">정보수정</a></li>
<li><a href="<?php echo G5_BBS_URL; ?>/logout.php?url=shop">로그아웃</a></li>
<?php if ($is_admin) { ?>
<li class="tnb_admin"><a href="<?php echo G5_ADMIN_URL; ?>/shop_admin/"><b>관리자</b></a></li>
<?php } ?>
<?php } else { ?>
<li><a href="<?php echo G5_BBS_URL; ?>/register.php">회원가입</a></li>
<li><a href="<?php echo G5_BBS_URL; ?>/login.php?url=<?php echo $urlencode; ?>"><b>로그인</b></a></li>
<?php } ?>
</ul>
</div>
<ul id="hd_qnb">
<li><a href="<?php echo G5_BBS_URL ?>/faq.php">FAQ</a></li>
<li><a href="<?php echo G5_BBS_URL ?>/qalist.php">1:1문의</a></li>
<li><a href="<?php echo G5_SHOP_URL ?>/personalpay.php">개인결제</a></li>
<li><a href="<?php echo G5_SHOP_URL ?>/itemuselist.php">사용후기</a></li>
<li><a href="<?php echo G5_SHOP_URL ?>/itemqalist.php">상품문의</a></li>
</ul>
</div>
</div>
<div id="hd_wrapper">
<div id="logo"><a href="<?php echo G5_SHOP_URL; ?>/"><img src="<?php echo G5_DATA_URL; ?>/common/logo_img" alt="<?php echo $config['cf_title']; ?>"></a></div>
<div id="hd_sch">
<h3>쇼핑몰 검색</h3>
<form name="frmsearch1" action="<?php echo G5_SHOP_URL; ?>/search.php" onsubmit="return search_submit(this);">
<label for="sch_str" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<input type="text" name="q" value="<?php echo stripslashes(get_text(get_search_string($q))); ?>" id="sch_str" required>
<button type="submit" id="sch_submit"><i class="fa fa-search" aria-hidden="true"></i><span class="sound_only">검색</span></button>
</form>
<script>
function search_submit(f) {
if (f.q.value.length < 2) {
alert("검색어는 두글자 이상 입력하십시오.");
f.q.select();
f.q.focus();
return false;
}
return true;
}
</script>
<div id="logo">
<a href="<?php echo G5_SHOP_URL; ?>/"><img src="<?php echo G5_DATA_URL; ?>/common/logo_img" alt="<?php echo $config['cf_title']; ?>"></a>
</div>
<div class="hd_sch_wr">
<fieldset id="hd_sch">
<legend>쇼핑몰 전체검색</legend>
<form name="frmsearch1" action="<?php echo G5_SHOP_URL; ?>/search.php" onsubmit="return search_submit(this);">
<label for="sch_str" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<input type="text" name="q" value="<?php echo stripslashes(get_text(get_search_string($q))); ?>" id="sch_str" required placeholder="검색어를 입력해주세요">
<button type="submit" id="sch_submit" value="검색"><i class="fa fa-search" aria-hidden="true"></i><span class="sound_only">검색</span></button>
</form>
<script>
function search_submit(f) {
if (f.q.value.length < 2) {
alert("검색어는 두글자 이상 입력하십시오.");
f.q.select();
f.q.focus();
return false;
}
return true;
}
</script>
</fieldset>
</div>
<!-- 쇼핑몰 배너 시작 { -->
<?php echo display_banner('왼쪽'); ?>
<?php // echo display_banner('왼쪽'); ?>
<!-- } 쇼핑몰 배너 끝 -->
</div>
<div id="hd_menu">
<ul>
<li><a href="<?php echo G5_SHOP_URL; ?>/listtype.php?type=1">히트상품</a></li>
<li><a href="<?php echo G5_SHOP_URL; ?>/listtype.php?type=2">추천상품</a></li>
<li><a href="<?php echo G5_SHOP_URL; ?>/listtype.php?type=3">최신상품</a></li>
<li><a href="<?php echo G5_SHOP_URL; ?>/listtype.php?type=4">인기상품</a></li>
<li><a href="<?php echo G5_SHOP_URL; ?>/listtype.php?type=5">할인상품</a></li>
<li class="hd_menu_right"><a href="<?php echo G5_BBS_URL; ?>/faq.php">FAQ</a></li>
<li class="hd_menu_right"><a href="<?php echo G5_BBS_URL; ?>/qalist.php">1:1문의</a></li>
<li class="hd_menu_right"><a href="<?php echo G5_SHOP_URL; ?>/personalpay.php">개인결제</a></li>
<li class="hd_menu_right"><a href="<?php echo G5_SHOP_URL; ?>/itemuselist.php">사용후기</a></li>
<li class="hd_menu_right"><a href="<?php echo G5_SHOP_URL; ?>/couponzone.php">쿠폰존</a></li>
<ul class="hd_login">
<?php if ($is_member) { ?>
<li class="shop_login">
<?php echo outlogin('shop_basic'); // 아웃로그인 ?>
</li>
<li class="shop_cart"><a href="<?php echo G5_SHOP_URL; ?>/cart.php"><i class="fa fa-shopping-cart" aria-hidden="true"></i><span class="sound_only">장바구니</span><span class="count"><?php echo get_boxcart_datas_count(); ?></span></a></li>
<?php } else { ?>
<li class="login"><a href="<?php echo G5_BBS_URL ?>/login.php?url=<?php echo $urlencode; ?>">로그인</a></li>
<?php } ?>
</ul>
</div>
<div id="hd_menu">
<button type="button" id="menu_open"><i class="fa fa-bars" aria-hidden="true"></i> 카테고리</button>
<?php include_once(G5_SHOP_PATH.'/category.php'); // 분류 ?>
<ul class="hd_menu">
<li><a href="<?php echo shop_type_url(1); ?>">히트상품</a></li>
<li><a href="<?php echo shop_type_url(2); ?>">추천상품</a></li>
<li><a href="<?php echo shop_type_url(3); ?>">최신상품</a></li>
<li><a href="<?php echo shop_type_url(4); ?>">인기상품</a></li>
<li><a href="<?php echo shop_type_url(5); ?>">할인상품</a></li>
</ul>
</div>
</div>
<!-- } 상단 끝 -->
<div id="side_menu">
<button type="button" id="btn_sidemenu" class="btn_sidemenu_cl"><i class="fa fa-outdent" aria-hidden="true"></i><span class="sound_only">사이드메뉴버튼</span></button>
<div class="side_menu_wr">
<?php echo outlogin('shop_basic'); // 아웃로그인 ?>
<div class="side_menu_shop">
<button type="button" class="btn_side_shop">오늘본상품<span class="count"><?php echo get_view_today_items_count(); ?></span></button>
<?php include(G5_SHOP_SKIN_PATH.'/boxtodayview.skin.php'); // 오늘 본 상품 ?>
<button type="button" class="btn_side_shop">장바구니<span class="count"><?php echo get_boxcart_datas_count(); ?></span></button>
<?php include_once(G5_SHOP_SKIN_PATH.'/boxcart.skin.php'); // 장바구니 ?>
<button type="button" class="btn_side_shop">위시리스트<span class="count"><?php echo get_wishlist_datas_count(); ?></span></button>
<?php include_once(G5_SHOP_SKIN_PATH.'/boxwish.skin.php'); // 위시리스트 ?>
</div>
<?php include_once(G5_SHOP_SKIN_PATH.'/boxcommunity.skin.php'); // 커뮤니티 ?>
<ul id="quick">
<li><button class="btn_sm_cl1 btn_sm"><i class="fa fa-user-o" aria-hidden="true"></i><span class="qk_tit">마이메뉴</span></button></li>
<li><button class="btn_sm_cl2 btn_sm"><i class="fa fa-archive" aria-hidden="true"></i><span class="qk_tit">오늘 본 상품</span></button></li>
<li><button class="btn_sm_cl3 btn_sm"><i class="fa fa-shopping-cart" aria-hidden="true"></i><span class="qk_tit">장바구니</span></button></li>
<li><button class="btn_sm_cl4 btn_sm"><i class="fa fa-heart-o" aria-hidden="true"></i><span class="qk_tit">위시리스트</span></button></li>
</ul>
<button type="button" id="top_btn"><i class="fa fa-arrow-up" aria-hidden="true"></i><span class="sound_only">상단으로</span></button>
<div id="tabs_con">
<div class="side_mn_wr1 qk_con">
<div class="qk_con_wr">
<?php echo outlogin('shop_side'); // 아웃로그인 ?>
<ul class="side_tnb">
<?php if ($is_member) { ?>
<li><a href="<?php echo G5_SHOP_URL; ?>/mypage.php">마이페이지</a></li>
<?php } ?>
<li><a href="<?php echo G5_SHOP_URL; ?>/orderinquiry.php">주문내역</a></li>
<li><a href="<?php echo G5_BBS_URL ?>/faq.php">FAQ</a></li>
<li><a href="<?php echo G5_BBS_URL ?>/qalist.php">1:1문의</a></li>
<li><a href="<?php echo G5_SHOP_URL ?>/personalpay.php">개인결제</a></li>
<li><a href="<?php echo G5_SHOP_URL ?>/itemuselist.php">사용후기</a></li>
<li><a href="<?php echo G5_SHOP_URL ?>/itemqalist.php">상품문의</a></li>
<li><a href="<?php echo G5_SHOP_URL; ?>/couponzone.php">쿠폰존</a></li>
</ul>
<?php // include_once(G5_SHOP_SKIN_PATH.'/boxcommunity.skin.php'); // 커뮤니티 ?>
<button type="button" class="con_close"><i class="fa fa-times-circle" aria-hidden="true"></i><span class="sound_only">나의정보 닫기</span></button>
</div>
</div>
<div class="side_mn_wr2 qk_con">
<div class="qk_con_wr">
<?php include(G5_SHOP_SKIN_PATH.'/boxtodayview.skin.php'); // 오늘 본 상품 ?>
<button type="button" class="con_close"><i class="fa fa-times-circle" aria-hidden="true"></i><span class="sound_only">오늘 본 상품 닫기</span></button>
</div>
</div>
<div class="side_mn_wr3 qk_con">
<div class="qk_con_wr">
<?php include_once(G5_SHOP_SKIN_PATH.'/boxcart.skin.php'); // 장바구니 ?>
<button type="button" class="con_close"><i class="fa fa-times-circle" aria-hidden="true"></i><span class="sound_only">장바구니 닫기</span></button>
</div>
</div>
<div class="side_mn_wr4 qk_con">
<div class="qk_con_wr">
<?php include_once(G5_SHOP_SKIN_PATH.'/boxwish.skin.php'); // 위시리스트 ?>
<button type="button" class="con_close"><i class="fa fa-times-circle" aria-hidden="true"></i><span class="sound_only">위시리스트 닫기</span></button>
</div>
</div>
</div>
</div>
<script>
$(function (){
jQuery(function ($){
$(".btn_member_mn").on("click", function() {
$(".member_mn").toggle();
$(".btn_member_mn").toggleClass("btn_member_mn_on");
});
var active_class = "btn_sm_on",
side_btn_el = "#quick .btn_sm",
quick_container = ".qk_con";
$(".btn_sidemenu_cl").on("click", function() {
$(".side_menu_wr").toggle();
$(".fa-outdent").toggleClass("fa-indent")
$(document).on("click", side_btn_el, function(e){
e.preventDefault();
var $this = $(this);
if (!$this.hasClass(active_class)) {
$(side_btn_el).removeClass(active_class);
$this.addClass(active_class);
}
if( $this.hasClass("btn_sm_cl1") ){
$(".side_mn_wr1").show();
} else if( $this.hasClass("btn_sm_cl2") ){
$(".side_mn_wr2").show();
} else if( $this.hasClass("btn_sm_cl3") ){
$(".side_mn_wr3").show();
} else if( $this.hasClass("btn_sm_cl4") ){
$(".side_mn_wr4").show();
}
}).on("click", ".con_close", function(e){
$(quick_container).hide();
$(side_btn_el).removeClass(active_class);
});
$(".btn_side_shop").on("click", function() {
$(this).next(".op_area").slideToggle(300).siblings(".op_area").slideUp();
$(document).mouseup(function (e){
var container = $(quick_container),
mn_container = $(".shop_login");
if( container.has(e.target).length === 0){
container.hide();
$(side_btn_el).removeClass(active_class);
}
if( mn_container.has(e.target).length === 0){
$(".member_mn").hide();
$(".btn_member_mn").removeClass("btn_member_mn_on");
}
});
$("#top_btn").on("click", function() {
$("html, body").animate({scrollTop:0}, '500');
return false;
});
});
</script>
<div id="wrapper">
<div id="aside">
<?php include_once(G5_SHOP_SKIN_PATH.'/boxcategory.skin.php'); // 상품분류 ?>
<?php include_once(G5_SHOP_PATH.'/category.php'); // 분류 ?>
<?php if($default['de_type4_list_use']) { ?>
<!-- 인기상품 시작 { -->
<section class="sale_prd">
<h2><a href="<?php echo G5_SHOP_URL; ?>/listtype.php?type=4">인기상품</a></h2>
<?php
$list = new item_list();
$list->set_type(4);
$list->set_view('it_id', false);
$list->set_view('it_name', true);
$list->set_view('it_basic', false);
$list->set_view('it_cust_price', false);
$list->set_view('it_price', true);
$list->set_view('it_icon', false);
$list->set_view('sns', false);
echo $list->run();
?>
</section>
<!-- } 인기상품 끝 -->
<?php } ?>
<!-- 커뮤니티 최신글 시작 { -->
<section id="sidx_lat">
<h2>커뮤니티 최신글</h2>
<?php echo latest('shop_basic', 'notice', 5, 30); ?>
</section>
<!-- } 커뮤니티 최신글 끝 -->
<?php echo poll('shop_basic'); // 설문조사 ?>
<?php echo visit('shop_basic'); // 접속자 ?>
</div>
<!-- } 상단 끝 -->
<!-- 콘텐츠 시작 { -->
<?php
$wrapper_class = array();
if( defined('G5_IS_COMMUNITY_PAGE') && G5_IS_COMMUNITY_PAGE ){
$wrapper_class[] = 'is_community';
}
?>
<!-- 전체 콘텐츠 시작 { -->
<div id="wrapper" class="<?php echo implode(' ', $wrapper_class); ?>">
<!-- #container 시작 { -->
<div id="container">
<?php if ((!$bo_table || $w == 's' ) && !defined('_INDEX_')) { ?><div id="wrapper_title"><?php echo $g5['title'] ?></div><?php } ?>
<!-- 글자크기 조정 display:none 되어 있음 시작 { -->
<div id="text_size">
<button class="no_text_resize" onclick="font_resize('container', 'decrease');">작게</button>
<button class="no_text_resize" onclick="font_default('container');">기본</button>
<button class="no_text_resize" onclick="font_resize('container', 'increase');">크게</button>
<?php if(defined('_INDEX_')) { ?>
<div id="aside">
<?php include_once(G5_SHOP_SKIN_PATH.'/boxcategory.skin.php'); // 상품분류 ?>
<?php if($default['de_type4_list_use']) { ?>
<!-- 인기상품 시작 { -->
<section id="side_pd">
<h2><a href="<?php echo shop_type_url('4'); ?>">인기상품</a></h2>
<?php
$list = new item_list();
$list->set_type(4);
$list->set_view('it_id', false);
$list->set_view('it_name', true);
$list->set_view('it_basic', false);
$list->set_view('it_cust_price', false);
$list->set_view('it_price', true);
$list->set_view('it_icon', false);
$list->set_view('sns', false);
$list->set_view('star', true);
echo $list->run();
?>
</section>
<!-- } 인기상품 끝 -->
<?php } ?>
<?php echo display_banner('왼쪽', 'boxbanner.skin.php'); ?>
<?php echo poll('shop_basic'); // 설문조사 ?>
</div>
<!-- } 글자크기 조정 display:none 되어 있음 끝 -->
<?php } // end if ?>
<?php
$content_class = array('shop-content');
if( isset($it_id) && isset($it) && isset($it['it_id']) && $it_id === $it['it_id']){
$content_class[] = 'is_item';
}
if( defined('IS_SHOP_SEARCH') && IS_SHOP_SEARCH ){
$content_class[] = 'is_search';
}
if( defined('_INDEX_') && _INDEX_ ){
$content_class[] = 'is_index';
}
?>
<!-- .shop-content 시작 { -->
<div class="<?php echo implode(' ', $content_class); ?>">
<?php if ((!$bo_table || $w == 's' ) && !defined('_INDEX_')) { ?><div id="wrapper_title"><?php echo $g5['title'] ?></div><?php } ?>
<!-- 글자크기 조정 display:none 되어 있음 시작 { -->
<div id="text_size">
<button class="no_text_resize" onclick="font_resize('container', 'decrease');">작게</button>
<button class="no_text_resize" onclick="font_default('container');">기본</button>
<button class="no_text_resize" onclick="font_resize('container', 'increase');">크게</button>
</div>
<!-- } 글자크기 조정 display:none 되어 있음 끝 -->

View File

@ -11,57 +11,46 @@ $admin = get_admin("super");
// 사용자 화면 우측과 하단을 담당하는 페이지입니다.
// 우측, 하단 화면을 꾸미려면 이 파일을 수정합니다.
?>
</div>
<!-- } 콘텐츠 끝 -->
</div> <!-- } .shop-content 끝 -->
</div> <!-- } #container 끝 -->
</div>
<!-- } 전체 콘텐츠 끝 -->
<!-- 하단 시작 { -->
</div>
<div id="ft">
<div class="ft_wr">
<ul class="ft_ul">
<li><a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=company">회사소개</a></li>
<li><a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=provision">서비스이용약관</a></li>
<li><a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=privacy">개인정보처리방침</a></li>
<div id="ft_wr">
<ul id="ft_link" class="ft_cnt">
<li><a href="<?php echo get_pretty_url('content', 'company'); ?>">회사소개</a></li>
<li><a href="<?php echo get_pretty_url('content', 'provision'); ?>">서비스이용약관</a></li>
<li><a href="<?php echo get_pretty_url('content', 'privacy'); ?>">개인정보처리방침</a></li>
<li><a href="<?php echo get_device_change_url(); ?>">모바일버전</a></li>
</ul>
<a href="<?php echo G5_SHOP_URL; ?>/" id="ft_logo"><img src="<?php echo G5_DATA_URL; ?>/common/logo_img2" alt="처음으로"></a>
<div id="ft_company" class="ft_cnt">
<h2>사이트 정보</h2>
<p class="ft_info">
<span><b>회사명</b> <?php echo $default['de_admin_company_name']; ?></span>
<span><b>주소</b> <?php echo $default['de_admin_company_addr']; ?></span><br>
<span><b>사업자 등록번호</b> <?php echo $default['de_admin_company_saupja_no']; ?></span>
<span><b>대표</b> <?php echo $default['de_admin_company_owner']; ?></span>
<span><b>전화</b> <?php echo $default['de_admin_company_tel']; ?></span>
<span><b>팩스</b> <?php echo $default['de_admin_company_fax']; ?></span><br>
<!-- <span><b>운영자</b> <?php echo $admin['mb_name']; ?></span><br> -->
<span><b>통신판매업신고번호</b> <?php echo $default['de_admin_tongsin_no']; ?></span>
<span><b>개인정보 보호책임자</b> <?php echo $default['de_admin_info_name']; ?></span><br>
<?php if ($default['de_admin_buga_no']) echo '<span><b>부가통신사업신고번호</b> '.$default['de_admin_buga_no'].'</span>'; ?>
</p>
</div>
<div class="ft_info">
<span><b>회사명</b> <?php echo $default['de_admin_company_name']; ?></span>
<span><b>주소</b> <?php echo $default['de_admin_company_addr']; ?></span><br>
<span><b>사업자 등록번호</b> <?php echo $default['de_admin_company_saupja_no']; ?></span>
<span><b>대표</b> <?php echo $default['de_admin_company_owner']; ?></span>
<span><b>전화</b> <?php echo $default['de_admin_company_tel']; ?></span>
<span><b>팩스</b> <?php echo $default['de_admin_company_fax']; ?></span><br>
<!-- <span><b>운영자</b> <?php echo $admin['mb_name']; ?></span><br> -->
<span><b>통신판매업신고번호</b> <?php echo $default['de_admin_tongsin_no']; ?></span>
<span><b>개인정보 보호책임자</b> <?php echo $default['de_admin_info_name']; ?></span>
<!-- 커뮤니티 최신글 시작 { -->
<section id="sidx_lat">
<?php echo latest('notice', 'notice', 5, 30); ?>
</section>
<!-- } 커뮤니티 최신글 끝 -->
<?php if ($default['de_admin_buga_no']) echo '<span><b>부가통신사업신고번호</b> '.$default['de_admin_buga_no'].'</span>'; ?><br>
Copyright &copy; 2001-2013 <?php echo $default['de_admin_company_name']; ?>. All Rights Reserved.
</div>
<div class="ft_cs">
<h2>고객센터</h2>
<strong>02-123-1234</strong>
<p>월-금 am 9:00 - pm 05:00<br>점심시간 : am 12:00 - pm 01:00</p>
</div>
<button type="button" id="top_btn"><i class="fa fa-arrow-up" aria-hidden="true"></i><span class="sound_only">상단으로</span></button>
<script>
$(function() {
$("#top_btn").on("click", function() {
$("html, body").animate({scrollTop:0}, '500');
return false;
});
});
</script>
<?php echo visit('shop_basic'); // 접속자 ?>
</div>
<div id="ft_copy">Copyright &copy; 2001-2013 <?php echo $default['de_admin_company_name']; ?>. All Rights Reserved.</div>
</div>
<?php
@ -76,7 +65,6 @@ if ($config['cf_analytics']) {
<script src="<?php echo G5_JS_URL; ?>/sns.js"></script>
<!-- } 하단 끝 -->
<?php
include_once(G5_PATH.'/tail.sub.php');
?>

View File

@ -27,13 +27,12 @@ include_once('./_head.php');
<div id="sod_ws">
<form name="fwishlist" method="post" action="./cartupdate.php">
<input type="hidden" name="act" value="multi">
<input type="hidden" name="act" value="multi">
<input type="hidden" name="sw_direct" value="">
<input type="hidden" name="prog" value="wish">
<input type="hidden" name="prog" value="wish">
<div class="list_02">
<ul>
<?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 ";
@ -50,13 +49,13 @@ include_once('./_head.php');
if ($row['it_tel_inq']) $out_cd = 'tel_inq';
$image = get_it_image($row['it_id'],230, 230);
$image = get_it_image($row['it_id'],225, 225);
?>
<li>
<div class="sod_ws_img"><a href="./item.php?it_id=<?php echo $row['it_id']; ?>"><?php echo $image; ?></a></div>
<div class="sod_ws_img"><a href="<?php echo shop_item_url($row['it_id']); ?>"><?php echo $image; ?></a></div>
<div class="wish_info">
<div class="wish_chk">
<div class="wish_chk">
<?php
// 품절검사
if(is_soldout($row['it_id']))
@ -64,20 +63,21 @@ include_once('./_head.php');
?>
품절
<?php } else { //품절이 아니면 체크할수 있도록한다 ?>
<label for="chk_it_id_<?php echo $i; ?>" class="sound_only"><?php echo $row['it_name']; ?></label>
<input type="checkbox" name="chk_it_id[<?php echo $i; ?>]" value="1" id="chk_it_id_<?php echo $i; ?>" onclick="out_cd_check(this, '<?php echo $out_cd; ?>');">
<div class="chk_box">
<input type="checkbox" name="chk_it_id[<?php echo $i; ?>]" value="1" id="chk_it_id_<?php echo $i; ?>" onclick="out_cd_check(this, '<?php echo $out_cd; ?>');" class="selec_chk">
<label for="chk_it_id_<?php echo $i; ?>"><span></span><b class="sound_only"><?php echo $row['it_name']; ?></b></label>
</div>
<?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">
<input type="hidden" name="ct_qty[<?php echo $row['it_id']; ?>][0]" value="1">
</div>
<a href="./item.php?it_id=<?php echo $row['it_id']; ?>" class="info_link"><?php echo stripslashes($row['it_name']); ?></a>
<a href="<?php echo shop_item_url($row['it_id']); ?>" class="info_link"><?php echo stripslashes($row['it_name']); ?></a>
<div class="info_date"><?php echo $row['wi_time']; ?></div>
<a href="./wishupdate.php?w=d&amp;wi_id=<?php echo $row['wi_id']; ?>" class="wish_del"><i class="fa fa-trash" aria-hidden="true"></i><span class="sound_only">삭제</span></a>
</div>
</li>
<?php
}
@ -89,14 +89,14 @@ include_once('./_head.php');
</div>
<div id="sod_ws_act">
<button type="submit" class="btn01" onclick="return fwishlist_check(document.fwishlist,'');"><i class="fa fa-shopping-cart" aria-hidden="true"></i> 장바구니 담기</button>
<button type="submit" class="btn02" onclick="return fwishlist_check(document.fwishlist,'direct_buy');"><i class="fa fa-credit-card" aria-hidden="true"></i> 주문하기</button>
<button type="submit" class="btn01" onclick="return fwishlist_check(document.fwishlist,'');">장바구니 담기</button>
<button type="submit" class="btn02" onclick="return fwishlist_check(document.fwishlist,'direct_buy');">주문하기</button>
</div>
</form>
</div>
<script>
<!--
function out_cd_check(fld, out_cd)
{
if (out_cd == 'no'){
@ -140,7 +140,7 @@ include_once('./_head.php');
return true;
}
//-->
</script>
<!-- } 위시리스트 끝 -->

View File

@ -35,8 +35,7 @@ else
}
// 상품정보 체크
$sql = " select it_id from {$g5['g5_shop_item_table']} where it_id = '$it_id' ";
$row = sql_fetch($sql);
$row = get_shop_item($it_id, true);
if(!$row['it_id'])
alert('상품정보가 존재하지 않습니다.', G5_SHOP_URL);