모바일 주문시 결제등록 요청 후 주문완료 처리되도록 스크립트 수정
This commit is contained in:
@ -203,11 +203,13 @@
|
||||
of.param_opt_3.value = "<?php echo $param_opt_3; ?>";
|
||||
|
||||
var od = window.opener.document;
|
||||
od.getElementById("show_req_btn").style.display = "none";
|
||||
od.getElementById("show_progress").style.display = "block";
|
||||
od.getElementById("show_pay_btn").style.display = "inline";
|
||||
od.getElementById("display_pay_button").style.display = "none";
|
||||
//od.getElementById("show_req_btn").style.display = "none";
|
||||
//od.getElementById("show_progress").style.display = "block";
|
||||
//od.getElementById("show_pay_btn").style.display = "inline";
|
||||
|
||||
alert("주문하기를 클릭하셔야 주문이 완료됩니다.");
|
||||
//alert("주문하기를 클릭하셔야 주문이 완료됩니다.");
|
||||
window.opener.forderform_check();
|
||||
window.close();
|
||||
} else {
|
||||
kcp_AJAX();
|
||||
|
||||
@ -338,7 +338,7 @@ ob_end_clean();
|
||||
</div>
|
||||
|
||||
<div id="sod_frm">
|
||||
<form name="forderform" method="post" action="<?php echo $order_action_url; ?>" onsubmit="return forderform_check(this);" autocomplete="off">
|
||||
<form name="forderform" method="post" action="<?php echo $order_action_url; ?>" autocomplete="off">
|
||||
<input type="hidden" name="od_amount" value="<?php echo $tot_sell_amount; ?>">
|
||||
<input type="hidden" name="org_od_amount" value="<?php echo $tot_sell_amount; ?>">
|
||||
<input type="hidden" name="od_send_cost" value="<?php echo $send_cost; ?>">
|
||||
@ -634,7 +634,7 @@ ob_end_clean();
|
||||
if ($temp_point > $member_point)
|
||||
$temp_point = $member_point;
|
||||
|
||||
echo '<div><input type="hidden" name="max_temp_point" value="<?php echo $temp_point; ?>">결제포인트 : <input type="text" id="od_temp_point" name="od_temp_point" value="0" size="10">점 (100점 단위로 입력하세요.)</div>';
|
||||
echo '<div><input type="hidden" name="max_temp_point" value="'.$temp_point.'">결제포인트 : <input type="text" id="od_temp_point" name="od_temp_point" value="0" size="10">점 (100점 단위로 입력하세요.)</div>';
|
||||
echo '<div>회원님의 보유포인트('.display_point($member['mb_point']).')중 <strong id="use_max_point">'.display_point($temp_point).'</strong>(주문금액 '.$default['de_point_per'].'%) 내에서 결제가 가능합니다.</div>';
|
||||
$multi_settle++;
|
||||
}
|
||||
@ -678,7 +678,7 @@ ob_end_clean();
|
||||
|
||||
<div id="display_pay_button" class="btn_confirm">
|
||||
<span id="show_req_btn"><input type="button" name="submitChecked" onClick="kcp_approval();" value="결제등록요청"class="btn_submit"></span>
|
||||
<span id="show_pay_btn" style="display:none;"><input type="submit" value="주문하기" class="btn_submit"></span>
|
||||
<span id="show_pay_btn" style="display:none;"><input type="button" onClick="forderform_check();" value="주문하기" class="btn_submit"></span>
|
||||
<a href="javascript:history.go(-1);" class="btn_cancel">취소</a>
|
||||
</div>
|
||||
</form>
|
||||
@ -1123,6 +1123,48 @@ function kcp_approval()
|
||||
var f = document.sm_form;
|
||||
var pf = document.forderform;
|
||||
|
||||
errmsg = "";
|
||||
errfld = "";
|
||||
var deffld = "";
|
||||
|
||||
check_field(pf.od_name, "주문하시는 분 이름을 입력하십시오.");
|
||||
if (typeof(pf.od_pwd) != 'undefined')
|
||||
{
|
||||
clear_field(pf.od_pwd);
|
||||
if( (pf.od_pwd.value.length<3) || (pf.od_pwd.value.search(/([^A-Za-z0-9]+)/)!=-1) )
|
||||
error_field(pf.od_pwd, "회원이 아니신 경우 주문서 조회시 필요한 비밀번호를 3자리 이상 입력해 주십시오.");
|
||||
}
|
||||
check_field(pf.od_tel, "주문하시는 분 전화번호를 입력하십시오.");
|
||||
check_field(pf.od_addr1, "우편번호 찾기를 이용하여 주문하시는 분 주소를 입력하십시오.");
|
||||
check_field(pf.od_addr2, " 주문하시는 분의 상세주소를 입력하십시오.");
|
||||
check_field(pf.od_zip1, "");
|
||||
check_field(pf.od_zip2, "");
|
||||
|
||||
clear_field(pf.od_email);
|
||||
if(pf.od_email.value=='' || pf.od_email.value.search(/(\S+)@(\S+)\.(\S+)/) == -1)
|
||||
error_field(pf.od_email, "E-mail을 바르게 입력해 주십시오.");
|
||||
|
||||
if (typeof(pf.od_hope_date) != "undefined")
|
||||
{
|
||||
clear_field(pf.od_hope_date);
|
||||
if (!pf.od_hope_date.value)
|
||||
error_field(pf.od_hope_date, "희망배송일을 선택하여 주십시오.");
|
||||
}
|
||||
|
||||
check_field(pf.od_b_name, "받으시는 분 이름을 입력하십시오.");
|
||||
check_field(pf.od_b_tel, "받으시는 분 전화번호를 입력하십시오.");
|
||||
check_field(pf.od_b_addr1, "우편번호 찾기를 이용하여 받으시는 분 주소를 입력하십시오.");
|
||||
check_field(pf.od_b_addr2, "받으시는 분의 상세주소를 입력하십시오.");
|
||||
check_field(pf.od_b_zip1, "");
|
||||
check_field(pf.od_b_zip2, "");
|
||||
|
||||
if (errmsg)
|
||||
{
|
||||
alert(errmsg);
|
||||
errfld.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
var settle_case = document.getElementsByName("od_settle_case");
|
||||
var settle_check = false;
|
||||
var settle_method = "";
|
||||
@ -1143,6 +1185,7 @@ function kcp_approval()
|
||||
|
||||
var tot_amount = <?php echo (int)$tot_amount; ?>;
|
||||
var max_point = 0;
|
||||
var temp_point = 0;
|
||||
if (typeof(pf.max_temp_point) != "undefined")
|
||||
max_point = parseInt(pf.max_temp_point.value);
|
||||
|
||||
@ -1182,15 +1225,42 @@ function kcp_approval()
|
||||
pf.od_temp_point.select();
|
||||
return false;
|
||||
}
|
||||
|
||||
// pg 결제 금액에서 포인트 금액 차감
|
||||
if(settle_method != "무통장" && temp_point > 0) {
|
||||
f.good_mny.value = parseInt(f.good_mny.value) - temp_point;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (document.getElementById("od_settle_iche")) {
|
||||
if (document.getElementById("od_settle_iche").checked) {
|
||||
if (tot_amount - temp_point < 150) {
|
||||
alert("계좌이체는 150원 이상 결제가 가능합니다.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (document.getElementById("od_settle_card")) {
|
||||
if (document.getElementById("od_settle_card").checked) {
|
||||
if (tot_amount - temp_point < 1000) {
|
||||
alert("신용카드는 1000원 이상 결제가 가능합니다.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (document.getElementById("od_settle_hp")) {
|
||||
if (document.getElementById("od_settle_hp").checked) {
|
||||
if (tot_amount - temp_point < 350) {
|
||||
alert("휴대폰은 350원 이상 결제가 가능합니다.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// pg 결제 금액에서 포인트 금액 차감
|
||||
if(settle_method != "무통장" && temp_point > 0) {
|
||||
f.good_mny.value = parseInt(f.good_mny.value) - temp_point;
|
||||
}
|
||||
|
||||
f.buyr_name.value = pf.od_name.value;
|
||||
f.buyr_mail.value = pf.od_email.value;
|
||||
f.buyr_tel1.value = pf.od_tel.value;
|
||||
@ -1214,8 +1284,9 @@ function kcp_approval()
|
||||
f.submit();
|
||||
}
|
||||
|
||||
function forderform_check(f)
|
||||
function forderform_check()
|
||||
{
|
||||
var f = document.forderform;
|
||||
errmsg = "";
|
||||
errfld = "";
|
||||
var deffld = "";
|
||||
@ -1361,7 +1432,12 @@ function forderform_check(f)
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
<?php if($default['de_tax_flag_use']) { ?>
|
||||
if(settle_method == "무통장")
|
||||
calculate_tax();
|
||||
<?php } ?>
|
||||
|
||||
f.submit();
|
||||
}
|
||||
|
||||
// 구매자 정보와 동일합니다.
|
||||
|
||||
Reference in New Issue
Block a user