#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

@ -15,11 +15,11 @@ $_POST = array_add_callback("mysql_real_escape_string", $_POST);
// 장바구니가 비어있는가?
if (get_session("ss_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('장바구니가 비어 있습니다.\\n\\n이미 주문하셨거나 장바구니에 담긴 상품이 없는 경우입니다.', G4_SHOP_URL.'/cart.php');
$error = "";
@ -31,7 +31,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++)
@ -64,7 +64,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'];
@ -110,7 +110,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);
@ -197,7 +197,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' ";
@ -208,7 +208,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']);
@ -382,10 +382,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')
@ -404,7 +401,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',
@ -465,10 +461,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);
@ -482,7 +478,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;
}
@ -515,7 +511,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' ";
@ -594,11 +590,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);
?>