#282 uq_id 필드 제거
This commit is contained in:
@ -9,7 +9,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
<ul>
|
||||
<?php
|
||||
$hsql = " select a.it_id, a.it_name, a.ct_qty from {$g4['shop_cart_table']} a left join {$g4['shop_item_table']} b on ( a.it_id = b.it_id ) ";
|
||||
$hsql .= " where a.uq_id = '".get_session('ss_uq_id')."' and a.ct_num = '0' order by a.ct_id ";
|
||||
$hsql .= " where a.od_id = '".get_session('ss_cart_id')."' and a.ct_num = '0' order by a.ct_id ";
|
||||
$hresult = sql_query($hsql);
|
||||
for ($i=0; $row=sql_fetch_array($hresult); $i++)
|
||||
{
|
||||
|
||||
@ -1,30 +1,12 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
// uq_id 설정
|
||||
set_unique_id($sw_direct);
|
||||
// cart id 설정
|
||||
set_cart_id($sw_direct);
|
||||
|
||||
// 회원일 경우 자신의 장바구니 상품 uq_id 값을 변경
|
||||
if($is_member && $sw_direct != 1) {
|
||||
$tmp_uq_id = get_session('ss_uq_id');
|
||||
if(!$tmp_uq_id) {
|
||||
$tmp_uq_id = get_uniqid();
|
||||
set_session('ss_uq_id', $tmp_uq_id);
|
||||
}
|
||||
|
||||
$ctime = date('Y-m-d H:i:s', (G4_SERVER_TIME - ($default['de_cart_keep_term'] * 86400)));
|
||||
$sql = " update {$g4['shop_cart_table']}
|
||||
set uq_id = '$tmp_uq_id'
|
||||
where mb_id = '{$member['mb_id']}'
|
||||
and ct_status = '쇼핑'
|
||||
and ct_direct = '0'
|
||||
and ct_time > '$ctime' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
$s_uq_id = get_session('ss_uq_id');
|
||||
$s_cart_id = get_session('ss_cart_id');
|
||||
// 선택필드 초기화
|
||||
$sql = " update {$g4['shop_cart_table']} set ct_select = '0' where uq_id = '$s_uq_id' ";
|
||||
$sql = " update {$g4['shop_cart_table']} set ct_select = '0' where od_id = '$s_cart_id' ";
|
||||
sql_query($sql);
|
||||
|
||||
$cart_action_url = G4_SHOP_URL.'/cartupdate.php';
|
||||
@ -65,7 +47,7 @@ include_once('./_head.php');
|
||||
$tot_sell_amount = 0;
|
||||
$tot_cancel_amount = 0;
|
||||
|
||||
// $s_uq_id 로 현재 장바구니 자료 쿼리
|
||||
// $s_cart_id 로 현재 장바구니 자료 쿼리
|
||||
$sql = " select a.ct_id,
|
||||
a.it_id,
|
||||
a.it_name,
|
||||
@ -78,7 +60,7 @@ include_once('./_head.php');
|
||||
b.ca_id2,
|
||||
b.ca_id3
|
||||
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));
|
||||
@ -97,7 +79,7 @@ include_once('./_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) { // 계속쇼핑
|
||||
@ -109,7 +91,7 @@ include_once('./_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>';
|
||||
|
||||
@ -11,12 +11,12 @@ if(!$it['it_id'])
|
||||
die('no-item');
|
||||
|
||||
// 장바구니 자료
|
||||
$uq_id = get_session('ss_uq_id');
|
||||
$sql = " select * from {$g4['shop_cart_table']} where uq_id = '$uq_id' and it_id = '$it_id' order by io_type asc, ct_num asc, ct_id asc ";
|
||||
$cart_id = get_session('ss_cart_id');
|
||||
$sql = " select * from {$g4['shop_cart_table']} where od_id = '$cart_id' and it_id = '$it_id' order by io_type asc, ct_num asc, ct_id asc ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
// 판매가격
|
||||
$sql2 = " select ct_price, it_name, ct_send_cost from {$g4['shop_cart_table']} where uq_id = '$uq_id' and it_id = '$it_id' and ct_num = '0' ";
|
||||
$sql2 = " select ct_price, it_name, ct_send_cost from {$g4['shop_cart_table']} where od_id = '$cart_id' and it_id = '$it_id' and ct_num = '0' ";
|
||||
$row2 = sql_fetch($sql2);
|
||||
|
||||
if(!mysql_num_rows($result))
|
||||
|
||||
@ -3,16 +3,16 @@ include_once('./_common.php');
|
||||
|
||||
// print_r2($_POST); exit;
|
||||
|
||||
// uq_id 설정
|
||||
set_unique_id($sw_direct);
|
||||
// cart id 설정
|
||||
set_cart_id($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 (!$tmp_uq_id)
|
||||
if (!$tmp_cart_id)
|
||||
{
|
||||
alert('더 이상 작업을 진행할 수 없습니다.\\n\\n브라우저의 쿠키 허용을 사용하지 않음으로 설정한것 같습니다.\\n\\n브라우저의 인터넷 옵션에서 쿠키 허용을 사용으로 설정해 주십시오.\\n\\n그래도 진행이 되지 않는다면 쇼핑몰 운영자에게 문의 바랍니다.');
|
||||
}
|
||||
@ -36,7 +36,7 @@ if($act == "buy")
|
||||
$it_id = $_POST['it_id'][$i];
|
||||
$sql = " update {$g4['shop_cart_table']}
|
||||
set ct_select = '1'
|
||||
where it_id = '$it_id' and uq_id = '$tmp_uq_id' ";
|
||||
where it_id = '$it_id' and od_id = '$tmp_cart_id' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
}
|
||||
@ -49,7 +49,7 @@ if($act == "buy")
|
||||
else if ($act == "alldelete") // 모두 삭제이면
|
||||
{
|
||||
$sql = " delete from {$g4['shop_cart_table']}
|
||||
where uq_id = '$tmp_uq_id' ";
|
||||
where od_id = '$tmp_cart_id' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
else if ($act == "seldelete") // 선택삭제
|
||||
@ -62,7 +62,7 @@ else if ($act == "seldelete") // 선택삭제
|
||||
$ct_chk = $_POST['ct_chk'][$i];
|
||||
if($ct_chk) {
|
||||
$it_id = $_POST['it_id'][$i];
|
||||
$sql = " delete from {$g4['shop_cart_table']} where it_id = '$it_id' and uq_id = '$tmp_uq_id' ";
|
||||
$sql = " delete from {$g4['shop_cart_table']} where it_id = '$it_id' and od_id = '$tmp_cart_id' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
}
|
||||
@ -124,7 +124,7 @@ else // 장바구니에 담기
|
||||
|
||||
$sql = " select SUM(ct_qty) as cnt from {$g4['shop_cart_table']}
|
||||
where it_id = '$it_id'
|
||||
and uq_id = '$tmp_uq_id'
|
||||
and od_id = '$tmp_cart_id'
|
||||
and io_id = '$io_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
$sum_qty = $row['cnt'];
|
||||
@ -145,24 +145,13 @@ else // 장바구니에 담기
|
||||
|
||||
// 바로구매에 있던 장바구니 자료를 지운다.
|
||||
if($i == 0)
|
||||
sql_query(" delete from {$g4['shop_cart_table']} where uq_id = '$tmp_uq_id' and ct_direct = 1 ", false);
|
||||
sql_query(" delete from {$g4['shop_cart_table']} where od_id = '$tmp_cart_id' and ct_direct = 1 ", false);
|
||||
|
||||
// 옵션수정일 때 기존 장바구니 자료를 먼저 삭제
|
||||
if($act == 'optionmod')
|
||||
sql_query(" delete from {$g4['shop_cart_table']} where uq_id = '$tmp_uq_id' and it_id = '$it_id' ");
|
||||
sql_query(" delete from {$g4['shop_cart_table']} where od_id = '$tmp_cart_id' and it_id = '$it_id' ");
|
||||
|
||||
// 장바구니에 Insert
|
||||
$sql = " select ct_num
|
||||
from {$g4['shop_cart_table']}
|
||||
where it_id = '$it_id'
|
||||
and uq_id = '$tmp_uq_id'
|
||||
order by ct_num desc ";
|
||||
$row = sql_fetch($sql);
|
||||
if($row['ct_num'] != '')
|
||||
$ct_num = (int)$row['ct_num'] + 1;
|
||||
else
|
||||
$ct_num = 0;
|
||||
|
||||
// 바로구매일 경우 장바구니가 체크된것으로 강제 설정
|
||||
if($sw_direct)
|
||||
$ct_select = 1;
|
||||
@ -172,7 +161,7 @@ else // 장바구니에 담기
|
||||
$ct_count = 0;
|
||||
$comma = '';
|
||||
$sql = " INSERT INTO {$g4['shop_cart_table']}
|
||||
( uq_id, mb_id, it_id, it_name, ct_status, ct_price, ct_point, ct_point_use, ct_stock_use, ct_option, ct_qty, ct_num, ct_notax, io_id, io_type, io_price, ct_time, ct_ip, ct_send_cost, ct_direct, ct_select )
|
||||
( od_id, mb_id, it_id, it_name, ct_status, ct_price, ct_point, ct_point_use, ct_stock_use, ct_option, ct_qty, ct_num, ct_notax, io_id, io_type, io_price, ct_time, ct_ip, ct_send_cost, ct_direct, ct_select )
|
||||
VALUES ";
|
||||
|
||||
for($k=0; $k<$opt_count; $k++) {
|
||||
@ -194,7 +183,7 @@ else // 장바구니에 담기
|
||||
// 동일옵션의 상품이 있으면 수량 더함
|
||||
$sql2 = " select ct_id
|
||||
from {$g4['shop_cart_table']}
|
||||
where uq_id = '$tmp_uq_id'
|
||||
where od_id = '$tmp_cart_id'
|
||||
and it_id = '$it_id'
|
||||
and io_id = '$io_id'
|
||||
and ct_status = '쇼핑' ";
|
||||
@ -207,9 +196,8 @@ else // 장바구니에 담기
|
||||
continue;
|
||||
}
|
||||
|
||||
$sql .= $comma."( '$tmp_uq_id', '{$member['mb_id']}', '{$it['it_id']}', '{$it['it_name']}', '쇼핑', '{$it['it_price']}', '$point', '0', '0', '$io_value', '$ct_qty', '$ct_num', '{$it['it_notax']}', '$io_id', '$io_type', '$io_price', '".G4_TIME_YMDHIS."', '$REMOTE_ADDR', '$ct_send_cost', '$sw_direct', '$ct_select' )";
|
||||
$sql .= $comma."( '$tmp_cart_id', '{$member['mb_id']}', '{$it['it_id']}', '{$it['it_name']}', '쇼핑', '{$it['it_price']}', '$point', '0', '0', '$io_value', '$ct_qty', '$k', '{$it['it_notax']}', '$io_id', '$io_type', '$io_price', '".G4_TIME_YMDHIS."', '$REMOTE_ADDR', '$ct_send_cost', '$sw_direct', '$ct_select' )";
|
||||
$comma = ' , ';
|
||||
$ct_num++;
|
||||
$ct_count++;
|
||||
}
|
||||
|
||||
|
||||
@ -30,7 +30,6 @@ if ( $req_tx == "pay" )
|
||||
// 카드내역 INSERT
|
||||
$sql = "insert {$g4['shop_card_history_table']}
|
||||
set od_id = '$ordr_idxx',
|
||||
uq_id = '$uq_id',
|
||||
cd_mall_id = '$site_cd',
|
||||
cd_amount = '$good_mny',
|
||||
cd_app_no = '$app_no',
|
||||
@ -51,7 +50,6 @@ if ( $req_tx == "pay" )
|
||||
// 계좌이체내역 INSERT
|
||||
$sql = "insert {$g4['shop_card_history_table']}
|
||||
set od_id = '$ordr_idxx',
|
||||
uq_id = '$uq_id',
|
||||
cd_mall_id = '$site_cd',
|
||||
cd_amount = '$good_mny',
|
||||
cd_app_no = '$tno',
|
||||
@ -75,7 +73,6 @@ if ( $req_tx == "pay" )
|
||||
// 가상계좌내역 INSERT
|
||||
$sql = "insert {$g4['shop_card_history_table']}
|
||||
set od_id = '$ordr_idxx',
|
||||
uq_id = '$uq_id',
|
||||
cd_mall_id = '$site_cd',
|
||||
cd_amount = '0',
|
||||
cd_app_no = '$tno',
|
||||
@ -101,7 +98,6 @@ if ( $req_tx == "pay" )
|
||||
// 휴대폰결제내역 INSERT
|
||||
$sql = "insert {$g4['shop_card_history_table']}
|
||||
set od_id = '$ordr_idxx',
|
||||
uq_id = '$uq_id',
|
||||
cd_mall_id = '$site_cd',
|
||||
cd_amount = '$good_mny',
|
||||
cd_app_no = '$tno',
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
<!--
|
||||
/* ============================================================================== */
|
||||
/* = PAGE : <EFBFBD><EFBFBD><EFBFBD><EFBFBD>â <20><><EFBFBD><EFBFBD> PAGE = */
|
||||
/* = PAGE : 진행창 예제 PAGE = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = Copyright (c) 2010.02 KCP Inc. All Rights Reserverd. = */
|
||||
/* ============================================================================== */
|
||||
//-->
|
||||
<html>
|
||||
<head>
|
||||
<title> ó<EFBFBD><EFBFBD><EFBFBD><EFBFBD> </title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
|
||||
<title> 처리중 </title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="ImageToolbar" content="No">
|
||||
</head>
|
||||
<body leftmargin="0" topmargin="0" onBlur="window.document.pro.focus();">
|
||||
|
||||
@ -12,13 +12,13 @@ if (G4_IS_MOBILE) {
|
||||
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'] = '주문서 작성';
|
||||
@ -27,8 +27,8 @@ include_once('./_head.php');
|
||||
|
||||
// 새로운 주문번호 생성
|
||||
$od_id = get_uniqid();
|
||||
set_session('ss_order_uniqid', $od_id);
|
||||
$s_uq_id = $tmp_uq_id;
|
||||
set_session('ss_order_id', $od_id);
|
||||
$s_cart_id = $tmp_cart_id;
|
||||
$order_action_url = G4_HTTPS_SHOP_URL.'/orderformupdate.php';
|
||||
if (file_exists('./settle_'.$default['de_card_pg'].'.inc.php')) {
|
||||
include './settle_'.$default['de_card_pg'].'.inc.php';
|
||||
@ -147,7 +147,7 @@ function get_intall_file()
|
||||
$goods = $goods_it_id = "";
|
||||
$goods_count = -1;
|
||||
|
||||
// $s_uq_id 로 현재 장바구니 자료 쿼리
|
||||
// $s_cart_id 로 현재 장바구니 자료 쿼리
|
||||
$sql = " select a.ct_id,
|
||||
a.it_id,
|
||||
a.it_name,
|
||||
@ -161,7 +161,7 @@ function get_intall_file()
|
||||
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']) {
|
||||
@ -187,7 +187,7 @@ function get_intall_file()
|
||||
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)
|
||||
@ -213,7 +213,7 @@ function get_intall_file()
|
||||
$image = get_it_image($row['it_id'], 50, 50);
|
||||
|
||||
$it_name = '<b>' . stripslashes($row['it_name']) . '</b>';
|
||||
$it_options = print_item_options($row['it_id'], $s_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>';
|
||||
}
|
||||
@ -1550,7 +1550,7 @@ function gumae2baesong(f)
|
||||
|
||||
<?php if ($default['de_hope_date_use']) { ?>
|
||||
$(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;" });
|
||||
$("#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 } ?>
|
||||
</script>
|
||||
|
||||
@ -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.'&uid='.$uid);
|
||||
?>
|
||||
|
||||
@ -24,7 +24,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 (a.od_id=b.od_id)
|
||||
where a.mb_id = '{$member['mb_id']}'
|
||||
group by a.od_id
|
||||
order by a.od_id desc
|
||||
|
||||
@ -9,7 +9,7 @@ if ($token && get_session("ss_token") == $token) {
|
||||
alert_close("토큰 에러");
|
||||
}
|
||||
|
||||
$od = sql_fetch(" select * from {$g4['shop_order_table']} where od_id = '$od_id' and uq_id = '$uq_id' and mb_id = '{$member['mb_id']}' ");
|
||||
$od = sql_fetch(" select * from {$g4['shop_order_table']} where od_id = '$od_id' and mb_id = '{$member['mb_id']}' ");
|
||||
|
||||
if (!$od['od_id']) {
|
||||
alert("존재하는 주문이 아닙니다.");
|
||||
@ -19,11 +19,14 @@ if (!$od['od_id']) {
|
||||
$sql = " select SUM(IF(ct_status = '주문', 1, 0)) as od_count2,
|
||||
COUNT(*) as od_count1
|
||||
from {$g4['shop_cart_table']}
|
||||
where uq_id = '$uq_id' ";
|
||||
where od_id = '$od_id' ";
|
||||
$ct = sql_fetch($sql);
|
||||
|
||||
if($ct['od_count1'] != $ct['od_count2'] || ($od['od_settle_case'] == '가상계좌' && $od['od_receipt_amount'] > 0))
|
||||
alert("취소할 수 있는 주문이 아닙니다.", G4_SHOP_URL."/orderinquiryview.php?od_id=$od_id&uq_id=$uq_id");
|
||||
$uid = md5($od['od_id'].$od['od_time'].$od['od_ip']);
|
||||
|
||||
if($ct['od_count1'] != $ct['od_count2'] || ($od['od_settle_case'] == '가상계좌' && $od['od_receipt_amount'] > 0)) {
|
||||
alert("취소할 수 있는 주문이 아닙니다.", G4_SHOP_URL."/orderinquiryview.php?od_id=$od_id&uid=$uid");
|
||||
}
|
||||
|
||||
// PG 결제 취소
|
||||
if($od['od_tno']) {
|
||||
@ -57,16 +60,16 @@ if($od['od_tno']) {
|
||||
}
|
||||
|
||||
// 장바구니 자료 취소
|
||||
sql_query(" update {$g4['shop_cart_table']} set ct_status = '취소' where uq_id = '$uq_id' ");
|
||||
sql_query(" update {$g4['shop_cart_table']} set ct_status = '취소' where od_id = '$od_id' ");
|
||||
|
||||
// 주문 취소
|
||||
$cancel_memo = addslashes($cancel_memo);
|
||||
//sql_query(" update $g4[shop_order_table] set od_temp_point = '0', od_receipt_point = '0', od_shop_memo = concat(od_shop_memo,\"\\n주문자 본인 직접 취소 - {$g4['time_ymdhis']} (취소이유 : {$cancel_memo})\") where uq_id = '$uq_id' ");
|
||||
sql_query(" update {$g4['shop_order_table']} set od_send_cost = '0', od_send_cost2 = '0', od_temp_point = '0', od_receipt_amount = '0', od_receipt_point = '0', od_shop_memo = concat(od_shop_memo,\"\\n주문자 본인 직접 취소 - ".G4_TIME_YMDHIS." (취소이유 : {$cancel_memo})\") where uq_id = '$uq_id' ");
|
||||
sql_query(" update {$g4['shop_order_table']} set od_send_cost = '0', od_send_cost2 = '0', od_temp_point = '0', od_receipt_amount = '0', od_receipt_point = '0', od_shop_memo = concat(od_shop_memo,\"\\n주문자 본인 직접 취소 - ".G4_TIME_YMDHIS." (취소이유 : {$cancel_memo})\") where od_id = '$od_id' ");
|
||||
|
||||
// 주문취소 회원의 포인트를 되돌려 줌
|
||||
if ($od['od_receipt_point'] > 0)
|
||||
insert_point($member['mb_id'], $od['od_receipt_point'], "주문번호 $od_id 본인 취소");
|
||||
|
||||
goto_url(G4_SHOP_URL."/orderinquiryview.php?od_id=$od_id&uq_id=$uq_id");
|
||||
$
|
||||
goto_url(G4_SHOP_URL."/orderinquiryview.php?od_id=$od_id&uid=$uid");
|
||||
?>
|
||||
@ -50,7 +50,6 @@ if(openwin != null) {
|
||||
<section id="sod_fin_list">
|
||||
<form name="forderrequest" method="post" action="./orderrequestupdate.php" onsubmit="return frequest_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="rq_type" value="">
|
||||
<h2>주문하신 상품</h2>
|
||||
<span class="sound_only">상품 상태 설명</span>
|
||||
@ -70,7 +69,7 @@ if(openwin != null) {
|
||||
|
||||
$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);
|
||||
@ -101,7 +100,7 @@ if(openwin != null) {
|
||||
<?php
|
||||
$sql = " select ct_id, it_name, 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);
|
||||
@ -529,7 +528,7 @@ if(openwin != null) {
|
||||
else
|
||||
{
|
||||
?>
|
||||
<a href="javascript:;" onclick="window.open('<?php echo G4_SHOP_URL; ?>/taxsave_kcp.php?od_id=<?php echo $od_id; ?>&uq_id=<?php echo $od['uq_id']; ?>', 'taxsave', 'width=550,height=400,scrollbars=1,menus=0');" class="btn_frmline">현금영수증을 발급하시려면 클릭하십시오.</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');" class="btn_frmline">현금영수증을 발급하시려면 클릭하십시오.</a>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
@ -712,7 +711,6 @@ if(openwin != null) {
|
||||
<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="uq_id" value="<?php echo $od['uq_id']; ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||
|
||||
<label for="cancel_memo">취소사유</label>
|
||||
|
||||
@ -12,13 +12,13 @@ $it = sql_fetch($sql);
|
||||
|
||||
// 상품 총 금액
|
||||
if($sw_direct)
|
||||
$uq_id = get_session('ss_uq_direct');
|
||||
$cart_id = get_session('ss_cart_direct');
|
||||
else
|
||||
$uq_id = get_session('ss_uq_id');
|
||||
$cart_id = get_session('ss_cart_id');
|
||||
|
||||
$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 = '$uq_id'
|
||||
where od_id = '$od_id'
|
||||
and it_id = '$it_id' ";
|
||||
$ct = sql_fetch($sql);
|
||||
$item_price = $ct['sum_price'];
|
||||
|
||||
@ -18,7 +18,7 @@ $sql = " select a.it_id,
|
||||
b.it_sell_email,
|
||||
b.it_origin
|
||||
from {$g4['shop_cart_table']} a left join {$g4['shop_item_table']} b on ( a.it_id = b.it_id )
|
||||
where a.uq_id = '$uq_id'
|
||||
where a.od_id = '$od_id'
|
||||
and a.ct_select = '1'
|
||||
and a.ct_num = '0' ";
|
||||
$result = sql_query($sql);
|
||||
@ -30,14 +30,14 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
SUM(ct_qty) as qty
|
||||
from {$g4['shop_cart_table']}
|
||||
where it_id = '{$row['it_id']}'
|
||||
and uq_id = '$uq_id'
|
||||
and od_id = '$od_id'
|
||||
and ct_select = '1' ";
|
||||
$sum = sql_fetch($sql);
|
||||
|
||||
// 옵션정보
|
||||
$sql2 = " select ct_option, ct_qty
|
||||
from {$g4['shop_cart_table']}
|
||||
where it_id = '{$row['it_id']}' and uq_id = '$uq_id' and ct_select = '1'
|
||||
where it_id = '{$row['it_id']}' and od_id = '$od_id' and ct_select = '1'
|
||||
order by io_type asc, ct_num asc, ct_id asc ";
|
||||
$result2 = sql_query($sql2);
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ $sql = " select b.it_sell_email,
|
||||
a.it_id,
|
||||
a.it_name
|
||||
from {$g4['shop_cart_table']} a left join {$g4['shop_item_table']} b on ( a.it_id = b.it_id )
|
||||
where a.uq_id = '$uq_id'
|
||||
where a.od_id = '$od_id'
|
||||
and a.ct_select = '1'
|
||||
and a.ct_num = '0'
|
||||
and b.it_sell_email <> '' ";
|
||||
@ -52,14 +52,14 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
SUM(ct_qty) as qty
|
||||
from {$g4['shop_cart_table']}
|
||||
where it_id = '{$row['it_id']}'
|
||||
and uq_id = '$uq_id'
|
||||
and od_id = '$od_id'
|
||||
and ct_select = '1' ";
|
||||
$sum = sql_fetch($sql);
|
||||
|
||||
// 옵션정보
|
||||
$sql2 = " select ct_option, ct_qty
|
||||
from {$g4['shop_cart_table']}
|
||||
where it_id = '{$row['it_id']}' and uq_id = '$uq_id' and ct_select = '1'
|
||||
where it_id = '{$row['it_id']}' and od_id = '$od_id' and ct_select = '1'
|
||||
order by io_type asc, ct_num asc, ct_id asc ";
|
||||
$result2 = sql_query($sql2);
|
||||
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
include_once('./_common.php');
|
||||
|
||||
$od_id = $_POST['od_id'];
|
||||
$uq_id = $_POST['uq_id'];
|
||||
$rq_type = $_POST['rq_type'];
|
||||
$rq_content = $_POST['rq_content'];
|
||||
|
||||
@ -21,7 +20,7 @@ switch($rq_type) {
|
||||
if(!count($_POST['chk_ct_id']))
|
||||
alert($req_act.'하실 상품을 하나이상 선택해 주십시오.');
|
||||
|
||||
$od = sql_fetch(" select od_id from {$g4['shop_order_table']} where od_id = '$od_id' and uq_id = '$uq_id' and mb_id = '{$member['mb_id']}' ");
|
||||
$od = sql_fetch(" select od_id, od_time, od_ip from {$g4['shop_order_table']} where od_id = '$od_id' and mb_id = '{$member['mb_id']}' ");
|
||||
|
||||
if (!$od['od_id']) {
|
||||
alert("존재하는 주문이 아닙니다.");
|
||||
@ -50,5 +49,5 @@ $sql = " insert into {$g4['shop_request_table']}
|
||||
( '$rq_type', '$od_id', '$ct_id', '{$member['mb_id']}', '$rq_content', '".G4_TIME_YMDHIS."', '$REMOTE_ADDR' ) ";
|
||||
sql_query($sql);
|
||||
|
||||
goto_url(G4_SHOP_URL.'/orderinquiryview.php?od_id='.$od_id.'&uq_id='.$uq_id);
|
||||
goto_url(G4_SHOP_URL.'/orderinquiryview.php?od_id='.$od_id.'&uid='.md5($od['od_id'].$od['od_time'].$od['od_ip']));
|
||||
?>
|
||||
@ -4,11 +4,11 @@ include_once('./_common.php');
|
||||
$g4['title'] = '주문번호 '.$od_id.' 현금영수증 발행';
|
||||
include_once(G4_PATH.'/head.sub.php');
|
||||
|
||||
$od = sql_fetch(" select * from {$g4['shop_order_table']} where od_id = '$od_id' and uq_id = '$uq_id' ");
|
||||
$od = sql_fetch(" select * from {$g4['shop_order_table']} where od_id = '$od_id' ");
|
||||
if (!$od)
|
||||
die('<p id="scash_empty">주문서가 존재하지 않습니다.</p>');
|
||||
|
||||
$goods = get_goods($od['uq_id']);
|
||||
$goods = get_goods($od['od_id']);
|
||||
$goods_name = $goods['full_name'];
|
||||
//if ($goods[count] > 1) $goods_name .= ' 외 '.$goods[count].'건';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user