g4를 g5로 변경
This commit is contained in:
@ -17,7 +17,7 @@ else
|
||||
$tmp_cart_id = get_session('ss_cart_id');
|
||||
|
||||
if (get_cart_count($tmp_cart_id) == 0)// 장바구니에 담기
|
||||
alert('장바구니가 비어 있습니다.\\n\\n이미 주문하셨거나 장바구니에 담긴 상품이 없는 경우입니다.', G4_SHOP_URL.'/cart.php');
|
||||
alert('장바구니가 비어 있습니다.\\n\\n이미 주문하셨거나 장바구니에 담긴 상품이 없는 경우입니다.', G5_SHOP_URL.'/cart.php');
|
||||
|
||||
$error = "";
|
||||
// 장바구니 상품 재고 검사
|
||||
@ -27,7 +27,7 @@ $sql = " select it_id,
|
||||
io_id,
|
||||
io_type,
|
||||
ct_option
|
||||
from {$g4['shop_cart_table']}
|
||||
from {$g5['shop_cart_table']}
|
||||
where od_id = '$tmp_cart_id'
|
||||
and ct_select = '1' ";
|
||||
$result = sql_query($sql);
|
||||
@ -45,7 +45,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
}
|
||||
|
||||
if($i == 0)
|
||||
alert('장바구니가 비어 있습니다.\\n\\n이미 주문하셨거나 장바구니에 담긴 상품이 없는 경우입니다.', G4_SHOP_URL.'/cart.php');
|
||||
alert('장바구니가 비어 있습니다.\\n\\n이미 주문하셨거나 장바구니에 담긴 상품이 없는 경우입니다.', G5_SHOP_URL.'/cart.php');
|
||||
|
||||
if ($error != "")
|
||||
{
|
||||
@ -63,7 +63,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_price,
|
||||
COUNT(distinct it_id) as cart_count
|
||||
from {$g4['shop_cart_table']} where od_id = '$tmp_cart_id' and ct_select = '1' ";
|
||||
from {$g5['shop_cart_table']} where od_id = '$tmp_cart_id' and ct_select = '1' ";
|
||||
$row = sql_fetch($sql);
|
||||
$tot_ct_price = $row['od_price'];
|
||||
$cart_count = $row['cart_count'];
|
||||
@ -79,11 +79,11 @@ if($is_member) {
|
||||
$cid = $_POST['cp_id'][$i];
|
||||
$it_id = $_POST['it_id'][$i];
|
||||
$sql = " select cp_id, cp_method, cp_target, cp_type, cp_price, cp_trunc, cp_minimum, cp_maximum
|
||||
from {$g4['shop_coupon_table']}
|
||||
from {$g5['shop_coupon_table']}
|
||||
where cp_id = '$cid'
|
||||
and mb_id IN ( '{$member['mb_id']}', '전체회원' )
|
||||
and cp_start <= '".G4_TIME_YMD."'
|
||||
and cp_end >= '".G4_TIME_YMD."'
|
||||
and cp_start <= '".G5_TIME_YMD."'
|
||||
and cp_end >= '".G5_TIME_YMD."'
|
||||
and cp_method IN ( 0, 1 ) ";
|
||||
$cp = sql_fetch($sql);
|
||||
if(!$cp['cp_id'])
|
||||
@ -96,7 +96,7 @@ if($is_member) {
|
||||
// 분류할인인지
|
||||
if($cp['cp_method']) {
|
||||
$sql2 = " select it_id, ca_id, ca_id2, ca_id3
|
||||
from {$g4['shop_item_table']}
|
||||
from {$g5['shop_item_table']}
|
||||
where it_id = '$it_id' ";
|
||||
$row2 = sql_fetch($sql2);
|
||||
|
||||
@ -112,7 +112,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']}
|
||||
from {$g5['shop_cart_table']}
|
||||
where od_id = '$tmp_cart_id'
|
||||
and it_id = '$it_id'
|
||||
and ct_select = '1' ";
|
||||
@ -144,11 +144,11 @@ if($is_member) {
|
||||
// 주문쿠폰
|
||||
if($_POST['od_cp_id']) {
|
||||
$sql = " select cp_id, cp_type, cp_price, cp_trunc, cp_minimum, cp_maximum
|
||||
from {$g4['shop_coupon_table']}
|
||||
from {$g5['shop_coupon_table']}
|
||||
where cp_id = '{$_POST['od_cp_id']}'
|
||||
and mb_id IN ( '{$member['mb_id']}', '전체회원' )
|
||||
and cp_start <= '".G4_TIME_YMD."'
|
||||
and cp_end >= '".G4_TIME_YMD."'
|
||||
and cp_start <= '".G5_TIME_YMD."'
|
||||
and cp_end >= '".G5_TIME_YMD."'
|
||||
and cp_method = '2' ";
|
||||
$cp = sql_fetch($sql);
|
||||
|
||||
@ -189,11 +189,11 @@ if($is_member && $send_cost > 0) {
|
||||
// 배송쿠폰
|
||||
if($_POST['sc_cp_id']) {
|
||||
$sql = " select cp_id, cp_type, cp_price, cp_trunc, cp_minimum, cp_maximum
|
||||
from {$g4['shop_coupon_table']}
|
||||
from {$g5['shop_coupon_table']}
|
||||
where cp_id = '{$_POST['sc_cp_id']}'
|
||||
and mb_id IN ( '{$member['mb_id']}', '전체회원' )
|
||||
and cp_start <= '".G4_TIME_YMD."'
|
||||
and cp_end >= '".G4_TIME_YMD."'
|
||||
and cp_start <= '".G5_TIME_YMD."'
|
||||
and cp_end >= '".G5_TIME_YMD."'
|
||||
and cp_method = '3' ";
|
||||
$cp = sql_fetch($sql);
|
||||
|
||||
@ -225,7 +225,7 @@ if ((int)($send_cost - $tot_sc_cp_price) !== (int)($i_send_cost - $i_send_coupon
|
||||
|
||||
// 추가배송비가 상이함
|
||||
$zipcode = $od_b_zip1 . $od_b_zip2;
|
||||
$sql = " select sc_id, sc_price from {$g4['shop_sendcost_table']} where sc_zip1 <= '$zipcode' and sc_zip2 >= '$zipcode' ";
|
||||
$sql = " select sc_id, sc_price from {$g5['shop_sendcost_table']} where sc_zip1 <= '$zipcode' and sc_zip2 >= '$zipcode' ";
|
||||
$tmp = sql_fetch($sql);
|
||||
if(!$tmp['sc_id'])
|
||||
$send_cost2 = 0;
|
||||
@ -269,11 +269,11 @@ if ($od_settle_case == "무통장")
|
||||
$od_receipt_point = $i_temp_point;
|
||||
$od_receipt_price = 0;
|
||||
$od_misu = $i_price - $od_receipt_price;
|
||||
$od_status = G4_OD_STATUS_ORDER;
|
||||
$od_status = G5_OD_STATUS_ORDER;
|
||||
}
|
||||
else if ($od_settle_case == "계좌이체")
|
||||
{
|
||||
include G4_SHOP_PATH.'/kcp/pp_ax_hub.php';
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
|
||||
|
||||
$od_tno = $tno;
|
||||
$od_receipt_price = $amount;
|
||||
@ -285,11 +285,11 @@ else if ($od_settle_case == "계좌이체")
|
||||
$od_bank_account = $bank_name;
|
||||
$pg_price = $amount;
|
||||
$od_misu = $i_price - $od_receipt_price;
|
||||
$od_status = G4_OD_STATUS_SETTLE;
|
||||
$od_status = G5_OD_STATUS_SETTLE;
|
||||
}
|
||||
else if ($od_settle_case == "가상계좌")
|
||||
{
|
||||
include G4_SHOP_PATH.'/kcp/pp_ax_hub.php';
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
|
||||
|
||||
$od_receipt_point = $i_temp_point;
|
||||
$od_tno = $tno;
|
||||
@ -300,11 +300,11 @@ else if ($od_settle_case == "가상계좌")
|
||||
$od_deposit_name = $depositor;
|
||||
$pg_price = $amount;
|
||||
$od_misu = $i_price - $od_receipt_price;
|
||||
$od_status = G4_OD_STATUS_ORDER;
|
||||
$od_status = G5_OD_STATUS_ORDER;
|
||||
}
|
||||
else if ($od_settle_case == "휴대폰")
|
||||
{
|
||||
include G4_SHOP_PATH.'/kcp/pp_ax_hub.php';
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
|
||||
|
||||
$od_tno = $tno;
|
||||
$od_receipt_price = $amount;
|
||||
@ -313,11 +313,11 @@ else if ($od_settle_case == "휴대폰")
|
||||
$od_bank_account = $commid.' '.$mobile_no;
|
||||
$pg_price = $amount;
|
||||
$od_misu = $i_price - $od_receipt_price;
|
||||
$od_status = G4_OD_STATUS_SETTLE;
|
||||
$od_status = G5_OD_STATUS_SETTLE;
|
||||
}
|
||||
else if ($od_settle_case == "신용카드")
|
||||
{
|
||||
include G4_SHOP_PATH.'/kcp/pp_ax_hub.php';
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
|
||||
|
||||
$od_tno = $tno;
|
||||
$od_app_no = $app_no;
|
||||
@ -328,7 +328,7 @@ else if ($od_settle_case == "신용카드")
|
||||
$od_bank_account = $card_name;
|
||||
$pg_price = $amount;
|
||||
$od_misu = $i_price - $od_receipt_price;
|
||||
$od_status = G4_OD_STATUS_SETTLE;
|
||||
$od_status = G5_OD_STATUS_SETTLE;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -339,7 +339,7 @@ else
|
||||
if($tno) {
|
||||
if((int)$i_price !== (int)$pg_price) {
|
||||
$cancel_msg = '결제금액 불일치';
|
||||
include G4_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php'; // 결제취소처리
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php'; // 결제취소처리
|
||||
|
||||
die("Receipt Amount Error");
|
||||
}
|
||||
@ -368,7 +368,7 @@ if($default['de_tax_flag_use']) {
|
||||
}
|
||||
|
||||
// 주문서에 입력
|
||||
$sql = " insert {$g4['shop_order_table']}
|
||||
$sql = " insert {$g5['shop_order_table']}
|
||||
set od_id = '$od_id',
|
||||
mb_id = '{$member['mb_id']}',
|
||||
od_pwd = '$od_pwd',
|
||||
@ -411,7 +411,7 @@ $sql = " insert {$g4['shop_order_table']}
|
||||
od_status = '$od_status',
|
||||
od_shop_memo = '',
|
||||
od_hope_date = '$od_hope_date',
|
||||
od_time = '".G4_TIME_YMDHIS."',
|
||||
od_time = '".G5_TIME_YMDHIS."',
|
||||
od_ip = '$REMOTE_ADDR',
|
||||
od_settle_case = '$od_settle_case'
|
||||
";
|
||||
@ -421,12 +421,12 @@ $result = sql_query($sql, false);
|
||||
if(!$result) {
|
||||
if($tno) {
|
||||
$cancel_msg = '주문정보 입력 오류';
|
||||
include G4_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php'; // 결제취소처리
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php'; // 결제취소처리
|
||||
}
|
||||
|
||||
// 관리자에게 오류 알림 메일발송
|
||||
$error = 'order';
|
||||
include G4_SHOP_PATH.'/ordererrormail.php';
|
||||
include G5_SHOP_PATH.'/ordererrormail.php';
|
||||
|
||||
die_utf8('<p>고객님의 주문 정보를 처리하는 중 오류가 발생해서 주문이 완료되지 않았습니다.</p><p>KCP를 이용한 전자결제(신용카드, 계좌이체, 가상계좌 등)은 자동 취소되었습니다.');
|
||||
}
|
||||
@ -437,7 +437,7 @@ $sql_card_point = "";
|
||||
if ($od_receipt_price > 0 && !$default['de_card_point']) {
|
||||
$sql_card_point = " , ct_point = '0' ";
|
||||
}
|
||||
$sql = "update {$g4['shop_cart_table']}
|
||||
$sql = "update {$g5['shop_cart_table']}
|
||||
set od_id = '$od_id',
|
||||
ct_status = '주문'
|
||||
$sql_card_point
|
||||
@ -449,15 +449,15 @@ $result = sql_query($sql, false);
|
||||
if(!$result) {
|
||||
if($tno) {
|
||||
$cancel_msg = '주문상태 변경 오류';
|
||||
include G4_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php'; // 결제취소처리
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php'; // 결제취소처리
|
||||
}
|
||||
|
||||
// 관리자에게 오류 알림 메일발송
|
||||
$error = 'status';
|
||||
include G4_SHOP_PATH.'/ordererrormail.php';
|
||||
include G5_SHOP_PATH.'/ordererrormail.php';
|
||||
|
||||
// 주문삭제
|
||||
sql_query(" delete from {$g4['shop_order_table']} where od_id = '$od_id' ");
|
||||
sql_query(" delete from {$g5['shop_order_table']} where od_id = '$od_id' ");
|
||||
|
||||
die_utf8('<p>고객님의 주문 정보를 처리하는 중 오류가 발생해서 주문이 완료되지 않았습니다.</p><p>KCP를 이용한 전자결제(신용카드, 계좌이체, 가상계좌 등)은 자동 취소되었습니다.');
|
||||
}
|
||||
@ -478,18 +478,18 @@ if($is_member) {
|
||||
$cp_prc = (int)$arr_it_cp_prc[$cp_it_id];
|
||||
|
||||
if(trim($cid)) {
|
||||
$sql = " insert into {$g4['shop_coupon_log_table']}
|
||||
$sql = " insert into {$g5['shop_coupon_log_table']}
|
||||
set cp_id = '$cid',
|
||||
mb_id = '{$member['mb_id']}',
|
||||
od_id = '$od_id',
|
||||
cp_price = '$cp_prc',
|
||||
cl_datetime = '".G4_TIME_YMDHIS."' ";
|
||||
cl_datetime = '".G5_TIME_YMDHIS."' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
// 쿠폰사용금액 cart에 기록
|
||||
$cp_prc = (int)$arr_it_cp_prc[$cp_it_id];
|
||||
$sql = " update {$g4['shop_cart_table']}
|
||||
$sql = " update {$g5['shop_cart_table']}
|
||||
set cp_price = '$cp_prc'
|
||||
where od_id = '$od_id'
|
||||
and it_id = '$cp_it_id'
|
||||
@ -500,29 +500,29 @@ if($is_member) {
|
||||
}
|
||||
|
||||
if($_POST['od_cp_id']) {
|
||||
$sql = " insert into {$g4['shop_coupon_log_table']}
|
||||
$sql = " insert into {$g5['shop_coupon_log_table']}
|
||||
set cp_id = '{$_POST['od_cp_id']}',
|
||||
mb_id = '{$member['mb_id']}',
|
||||
od_id = '$od_id',
|
||||
cp_price = '$tot_od_cp_price',
|
||||
cl_datetime = '".G4_TIME_YMDHIS."' ";
|
||||
cl_datetime = '".G5_TIME_YMDHIS."' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
if($_POST['sc_cp_id']) {
|
||||
$sql = " insert into {$g4['shop_coupon_log_table']}
|
||||
$sql = " insert into {$g5['shop_coupon_log_table']}
|
||||
set cp_id = '{$_POST['sc_cp_id']}',
|
||||
mb_id = '{$member['mb_id']}',
|
||||
od_id = '$od_id',
|
||||
cp_price = '$tot_sc_cp_price',
|
||||
cl_datetime = '".G4_TIME_YMDHIS."' ";
|
||||
cl_datetime = '".G5_TIME_YMDHIS."' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
include_once(G4_SHOP_PATH.'/ordermail1.inc.php');
|
||||
include_once(G4_SHOP_PATH.'/ordermail2.inc.php');
|
||||
include_once(G5_SHOP_PATH.'/ordermail1.inc.php');
|
||||
include_once(G5_SHOP_PATH.'/ordermail2.inc.php');
|
||||
|
||||
// SMS BEGIN --------------------------------------------------------
|
||||
// 주문고객과 쇼핑몰관리자에게 SMS 전송
|
||||
@ -531,7 +531,7 @@ if($default['de_sms_use'] && ($default['de_sms_use2'] || $default['de_sms_use3']
|
||||
$recv_numbers = array($od_hp, $default['de_sms_hp']);
|
||||
$send_numbers = array($default['de_admin_company_tel'], $od_hp);
|
||||
|
||||
include_once(G4_LIB_PATH.'/icode.sms.lib.php');
|
||||
include_once(G5_LIB_PATH.'/icode.sms.lib.php');
|
||||
|
||||
$SMS = new SMS; // SMS 연결
|
||||
$SMS->SMS_con($default['de_icode_server_ip'], $default['de_icode_id'], $default['de_icode_pw'], $default['de_icode_server_port']);
|
||||
@ -565,7 +565,7 @@ if($default['de_sms_use'] && ($default['de_sms_use2'] || $default['de_sms_use3']
|
||||
|
||||
|
||||
// orderview 에서 사용하기 위해 session에 넣고
|
||||
$uid = md5($od_id.G4_TIME_YMDHIS.$REMOTE_ADDR);
|
||||
$uid = md5($od_id.G5_TIME_YMDHIS.$REMOTE_ADDR);
|
||||
set_session('ss_orderview_uid', $uid);
|
||||
|
||||
// 주문번호제거
|
||||
@ -583,7 +583,7 @@ if($is_member && ($add_address || $ad_default)) {
|
||||
$ad_addr2 = $od_b_addr2;
|
||||
|
||||
$sql = " select ad_id
|
||||
from {$g4['shop_order_address_table']}
|
||||
from {$g5['shop_order_address_table']}
|
||||
where mb_id = '{$member['mb_id']}'
|
||||
and ad_zip1 = '$ad_zip1'
|
||||
and ad_zip2 = '$ad_zip2'
|
||||
@ -592,14 +592,14 @@ if($is_member && ($add_address || $ad_default)) {
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
if($ad_default) {
|
||||
$sql = " update {$g4['shop_order_address_table']}
|
||||
$sql = " update {$g5['shop_order_address_table']}
|
||||
set ad_default = '0'
|
||||
where mb_id = '{$member['mb_id']}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
if($row['ad_id']) {
|
||||
$sql = " update {$g4['shop_order_address_table']}
|
||||
$sql = " update {$g5['shop_order_address_table']}
|
||||
set ad_zip1 = '$ad_zip1',
|
||||
ad_zip2 = '$ad_zip2',
|
||||
ad_addr1 = '$ad_addr1',
|
||||
@ -614,7 +614,7 @@ if($is_member && ($add_address || $ad_default)) {
|
||||
}
|
||||
|
||||
if(!$row['ad_id'] && $add_address) {
|
||||
$sql = " insert into {$g4['shop_order_address_table']}
|
||||
$sql = " insert into {$g5['shop_order_address_table']}
|
||||
set mb_id = '{$member['mb_id']}',
|
||||
ad_subject = '$ad_subject',
|
||||
ad_default = '$ad_default',
|
||||
@ -629,7 +629,7 @@ if($is_member && ($add_address || $ad_default)) {
|
||||
}
|
||||
}
|
||||
|
||||
goto_url(G4_SHOP_URL.'/orderinquiryview.php?od_id='.$od_id.'&uid='.$uid);
|
||||
goto_url(G5_SHOP_URL.'/orderinquiryview.php?od_id='.$od_id.'&uid='.$uid);
|
||||
?>
|
||||
|
||||
<html>
|
||||
|
||||
Reference in New Issue
Block a user