#282 uq_id 필드 제거

This commit is contained in:
chicpro
2013-08-23 10:39:16 +09:00
parent 8ae41a2213
commit 523c6e5e31
44 changed files with 216 additions and 269 deletions

View File

@ -27,7 +27,7 @@ include_once(G4_MSHOP_PATH.'/_head.php');
$tot_point = 0;
$tot_sell_amount = 0;
// $s_uq_id 로 현재 장바구니 자료 쿼리
// $s_cart_id 로 현재 장바구니 자료 쿼리
$sql = " select a.ct_id,
a.it_id,
a.it_name,
@ -38,7 +38,7 @@ include_once(G4_MSHOP_PATH.'/_head.php');
a.ct_send_cost,
b.ca_id
from {$g4['shop_cart_table']} a left join {$g4['shop_item_table']} b on ( a.it_id = b.it_id )
where a.uq_id = '$s_uq_id'
where a.od_id = '$s_cart_id'
and a.ct_num = '0' ";
if($default['de_cart_keep_term']) {
$ctime = date('Y-m-d H:i:s', G4_SERVER_TIME - ($default['de_cart_keep_term'] * 86400));
@ -57,7 +57,7 @@ include_once(G4_MSHOP_PATH.'/_head.php');
SUM(ct_qty) as qty
from {$g4['shop_cart_table']}
where it_id = '{$row['it_id']}'
and uq_id = '$s_uq_id' ";
and od_id = '$s_cart_id' ";
$sum = sql_fetch($sql);
if ($i==0) { // 계속쇼핑
@ -69,7 +69,7 @@ include_once(G4_MSHOP_PATH.'/_head.php');
$image = get_it_image($row['it_id'], 70, 70);
$it_name = $a1 . stripslashes($row['it_name']) . $a2;
$it_options = print_item_options($row['it_id'], $s_uq_id);
$it_options = print_item_options($row['it_id'], $s_cart_id);
if($it_options) {
$mod_options = '<div class="sod_option_btn"><button type="button" class="mod_options">선택사항수정</button></div>';
$it_name .= '<div class="sod_bsk_itopt">'.$it_options.'</div>';

View File

@ -19,7 +19,6 @@ if ( $req_tx == "pay" )
// 카드내역 INSERT
$sql = "insert {$g4['shop_card_history_table']}
set od_id = '$ordr_idxx',
uq_id = '$tmp_uq_id',
cd_mall_id = '$g_conf_site_cd',
cd_amount = '$good_mny',
cd_app_no = '$app_no',
@ -40,7 +39,6 @@ if ( $req_tx == "pay" )
// 계좌이체내역 INSERT
$sql = "insert {$g4['shop_card_history_table']}
set od_id = '$ordr_idxx',
uq_id = '$tmp_uq_id',
cd_mall_id = '$g_conf_site_cd',
cd_amount = '$good_mny',
cd_app_no = '$tno',
@ -63,7 +61,6 @@ if ( $req_tx == "pay" )
// 가상계좌내역 INSERT
$sql = "insert {$g4['shop_card_history_table']}
set od_id = '$ordr_idxx',
uq_id = '$tmp_uq_id',
cd_mall_id = '$g_conf_site_cd',
cd_amount = '0',
cd_app_no = '$tno',
@ -88,7 +85,6 @@ if ( $req_tx == "pay" )
// 휴대폰결제내역 INSERT
$sql = "insert {$g4['shop_card_history_table']}
set od_id = '$ordr_idxx',
uq_id = '$tmp_uq_id',
cd_mall_id = '$g_conf_site_cd',
cd_amount = '$good_mny',
cd_app_no = '$tno',

View File

@ -4,13 +4,13 @@ include_once('./_common.php');
set_session("ss_direct", $sw_direct);
// 장바구니가 비어있는가?
if ($sw_direct) {
$tmp_uq_id = get_session("ss_uq_direct");
$tmp_cart_id = get_session("ss_cart_direct");
}
else {
$tmp_uq_id = get_session("ss_uq_id");
$tmp_cart_id = get_session("ss_cart_id");
}
if (get_cart_count($tmp_uq_id) == 0)
if (get_cart_count($tmp_cart_id) == 0)
alert('장바구니가 비어 있습니다.', G4_SHOP_URL.'/cart.php');
$g4['title'] = '주문서 작성';
@ -19,9 +19,9 @@ include_once(G4_MSHOP_PATH.'/_head.php');
// 새로운 주문번호 생성
$od_id = get_uniqid();
set_session('ss_order_uniqid', $od_id);
set_session('ss_order_id', $od_id);
$s_uq_id = $tmp_uq_id;
$s_cart_id = $tmp_cart_id;
$order_action_url = G4_HTTPS_MSHOP_URL.'/orderformupdate.php';
if (file_exists('./settle_'.$default['de_card_pg'].'.inc.php')) {
include './settle_'.$default['de_card_pg'].'.inc.php';
@ -57,7 +57,7 @@ ob_start();
$goods = $goods_it_id = "";
$goods_count = -1;
// $s_uq_id 로 현재 장바구니 자료 쿼리
// $s_cart_id 로 현재 장바구니 자료 쿼리
$sql = " select a.ct_id,
a.it_id,
a.it_name,
@ -71,7 +71,7 @@ ob_start();
b.ca_id3,
b.it_notax
from {$g4['shop_cart_table']} a left join {$g4['shop_item_table']} b on ( a.it_id = b.it_id )
where a.uq_id = '$s_uq_id'
where a.od_id = '$s_cart_id'
and a.ct_select = '1'
and a.ct_num = '0' ";
if($default['de_cart_keep_term']) {
@ -97,7 +97,7 @@ ob_start();
SUM(ct_qty) as qty
from {$g4['shop_cart_table']}
where it_id = '{$row['it_id']}'
and uq_id = '$s_uq_id' ";
and od_id = '$s_cart_id' ";
$sum = sql_fetch($sql);
if (!$goods)
@ -125,7 +125,7 @@ ob_start();
$image = get_it_image($row['it_id'], 50, 50);
$it_name = $a1 . stripslashes($row['it_name']) . $a2;
$it_options = print_item_options($row['it_id'], $s_uq_id);
$it_options = print_item_options($row['it_id'], $s_cart_id);
if($it_options) {
$it_name .= '<div class="sod_bsk_itopt">'.$it_options.'</div>';
}

View File

@ -20,12 +20,12 @@ if($od_settle_case != '무통장') {
}
// 장바구니가 비어있는가?
if (get_session("ss_direct"))
$tmp_uq_id = get_session('ss_uq_direct');
if (get_session('ss_direct'))
$tmp_cart_id = get_session('ss_cart_direct');
else
$tmp_uq_id = get_session('ss_uq_id');
$tmp_cart_id = get_session('ss_cart_id');
if (get_cart_count($tmp_uq_id) == 0)// 장바구니에 담기
if (get_cart_count($tmp_cart_id) == 0)// 장바구니에 담기
alert('장바구니가 비어 있습니다.\\n\\n이미 주문하셨거나 장바구니에 담긴 상품이 없는 경우입니다.', G4_SHOP_URL.'/cart.php');
$error = "";
@ -37,7 +37,7 @@ $sql = " select it_id,
io_type,
ct_option
from {$g4['shop_cart_table']}
where uq_id = '$tmp_uq_id'
where od_id = '$tmp_cart_id'
and ct_select = '1' ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
@ -70,7 +70,7 @@ $i_temp_point = (int)$_POST['od_temp_point'];
// 주문금액이 상이함
$sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as od_amount
from {$g4['shop_cart_table']} where uq_id = '$tmp_uq_id' and ct_select = '1' ";
from {$g4['shop_cart_table']} where od_id = '$tmp_cart_id' and ct_select = '1' ";
$row = sql_fetch($sql);
$tot_ct_amount = $row['od_amount'];
@ -116,7 +116,7 @@ if($is_member) {
// 상품금액
$sql = " select SUM( IF(io_type = '1', io_price * ct_qty, (ct_price + io_price) * ct_qty)) as sum_price
from {$g4['shop_cart_table']}
where uq_id = '$tmp_uq_id'
where od_id = '$tmp_cart_id'
and it_id = '$it_id'
and ct_select = '1' ";
$ct = sql_fetch($sql);
@ -203,7 +203,7 @@ if ($default['de_send_cost_case'] == '없음') {
$send_cost = 0;
$sql = " select it_id
from {$g4['shop_cart_table']}
where uq_id = '$tmp_uq_id'
where od_id = '$tmp_cart_id'
and ct_select = '1'
and ct_num = '0'
and ct_send_cost = '0' ";
@ -214,7 +214,7 @@ if ($default['de_send_cost_case'] == '없음') {
SUM(ct_qty) as qty
from {$g4['shop_cart_table']}
where it_id = '{$sc['it_id']}'
and uq_id = '$tmp_uq_id' ";
and od_id = '$tmp_cart_id' ";
$sum = sql_fetch($sql);
$send_cost += get_item_sendcost($sc['it_id'], $sum['price'], $sum['qty']);
@ -388,10 +388,7 @@ else
$od_pwd = sql_password($_POST['od_pwd']);
// 주문번호를 얻는다.
$od_id = get_session('ss_order_uniqid');
// 주문상품의 uq_id 변경을 위한 uq_id를 얻는다.
$uq_id = get_uniqid();
$od_id = get_session('ss_order_id');
$od_escrow = 0;
if($escw_yn == 'Y')
@ -410,7 +407,6 @@ if($default['de_tax_flag_use']) {
// 주문서에 입력
$sql = " insert {$g4['shop_order_table']}
set od_id = '$od_id',
uq_id = '$uq_id',
mb_id = '{$member['mb_id']}',
od_pwd = '$od_pwd',
od_name = '$od_name',
@ -472,10 +468,10 @@ if ($od_receipt_amount > 0 && !$default['de_card_point']) {
$sql_card_point = " , ct_point = '0' ";
}
$sql = "update {$g4['shop_cart_table']}
set uq_id = '$uq_id',
set od_id = '$od_id',
ct_status = '주문'
$sql_card_point
where uq_id = '$tmp_uq_id'
where od_id = '$tmp_cart_id'
and ct_select = '1' ";
$result = sql_query($sql, false);
@ -489,7 +485,7 @@ if(!$result) {
echo "<p>$sql<p>" . mysql_errno() . " : " . mysql_error() . "<p>error file : {$_SERVER['PHP_SELF']}";
// 주문삭제
sql_query(" delete from {$g4['shop_order_table']} where od_id = '$od_id' and uq_id = '$uq_id' ");
sql_query(" delete from {$g4['shop_order_table']} where od_id = '$od_id' ");
exit;
}
@ -521,7 +517,7 @@ if($is_member) {
$cp_amt = (int)$arr_it_cp_amt[$cp_it_id];
$sql = " update {$g4['shop_cart_table']}
set cp_amount = '$cp_amt'
where uq_id = '$uq_id'
where od_id = '$od_id'
and it_id = '$cp_it_id'
and ct_select = '1'
and ct_num = '0' ";
@ -600,11 +596,11 @@ $uid = md5($od_id.G4_TIME_YMDHIS.$REMOTE_ADDR);
set_session('ss_orderview_uid', $uid);
// 주문번호제거
set_session('ss_order_uniqid', '');
set_session('ss_order_id', '');
// 기존자료 세션에서 제거
if (get_session('ss_direct'))
set_session('ss_uq_direct', '');
set_session('ss_cart_direct', '');
goto_url(G4_SHOP_URL.'/orderinquiryview.php?od_id='.$od_id.'&amp;uid='.$uid);
?>

View File

@ -43,7 +43,7 @@ $from_record = ($page - 1) * $rows; // 시작 열을 구함
// 비회원 주문확인의 경우 바로 주문서 상세조회로 이동
if (!$is_member)
{
$sql = " select od_id, uq_id from {$g4['shop_order_table']} where od_id = '$od_id' and od_pwd = '$od_pwd' ";
$sql = " select od_id, od_time, od_ip from {$g4['shop_order_table']} where od_id = '$od_id' and od_pwd = '$od_pwd' ";
$row = sql_fetch($sql);
if ($row['od_id']) {
$uid = md5($row['od_id'].$row['od_time'].$row['od_ip']);

View File

@ -21,7 +21,7 @@ if (!defined("_ORDERINQUIRY_")) exit; // 개별 페이지 접근 불가
$sql = " select a.od_id,
a.*, "._MISU_QUERY_."
from {$g4['shop_order_table']} a
left join {$g4['shop_cart_table']} b on (b.uq_id=a.uq_id)
left join {$g4['shop_cart_table']} b on (b.od_id=a.od_id)
where a.mb_id = '{$member['mb_id']}'
group by a.od_id
order by a.od_id desc

View File

@ -26,8 +26,6 @@ if($rq['cnt'])
// 결제방법
$settle_case = $od['od_settle_case'];
set_session('ss_temp_uq_id', $uq_id);
$g4['title'] = '주문상세내역';
include_once(G4_MSHOP_PATH.'/_head.php');
?>
@ -55,7 +53,7 @@ include_once(G4_MSHOP_PATH.'/_head.php');
$sql = " select it_id, it_name, cp_amount
from {$g4['shop_cart_table']}
where uq_id = '$uq_id'
where od_id = '$od_id'
and ct_num = '0'
order by ct_id ";
$result = sql_query($sql);
@ -86,7 +84,7 @@ include_once(G4_MSHOP_PATH.'/_head.php');
<?php
$sql = " select ct_option, ct_qty, ct_price, ct_point, ct_status, io_type, io_price
from {$g4['shop_cart_table']}
where uq_id = '$uq_id'
where od_id = '$od_id'
and it_id = '{$row['it_id']}'
order by ct_num ";
$res = sql_query($sql);
@ -510,7 +508,7 @@ include_once(G4_MSHOP_PATH.'/_head.php');
else
{
?>
<a href="javascript:;" onclick="window.open('<?php echo G4_SHOP_URL; ?>/taxsave_kcp.php?od_id=<?php echo $od_id; ?>&amp;uq_id=<?php echo $od['uq_id']; ?>', 'taxsave', 'width=550,height=400,scrollbars=1,menus=0');">현금영수증을 발급하시려면 클릭하십시오.</a>
<a href="javascript:;" onclick="window.open('<?php echo G4_SHOP_URL; ?>/taxsave_kcp.php?od_id=<?php echo $od_id; ?>', 'taxsave', 'width=550,height=400,scrollbars=1,menus=0');">현금영수증을 발급하시려면 클릭하십시오.</a>
<?php } ?>
</td>
</tr>
@ -693,7 +691,6 @@ include_once(G4_MSHOP_PATH.'/_head.php');
<div id="sod_fin_cancelfrm">
<form method="post" action="<?php echo G4_SHOP_URL; ?>/orderinquirycancel.php" onsubmit="return fcancel_check(this);">
<input type="hidden" name="od_id" value="<?php echo $od['od_id']; ?>">
<input type="hidden" name="uq_id" value="<?php echo $od['uq_id']; ?>">
<input type="hidden" name="token" value="<?php echo $token; ?>">
<label for="cancel_memo">취소사유</label>