diff --git a/head.sub.php b/head.sub.php
index 7f069dc09..9f757b1cc 100644
--- a/head.sub.php
+++ b/head.sub.php
@@ -82,7 +82,7 @@ if ($is_admin) {
set_cookie("device_width", screen.width, 6, g4_cookie_domain); '.PHP_EOL;
- echo ''.PHP_EOL; // overflow scroll 감지
+ echo ''.PHP_EOL; // overflow scroll 감지
}
//if(!defined('G4_IS_ADMIN'))
echo $config['cf_add_script'];
diff --git a/js/shop.js b/js/shop.js
index b16ebf6da..87069bcd0 100644
--- a/js/shop.js
+++ b/js/shop.js
@@ -1,5 +1,6 @@
var option_add = false;
var supply_add = false;
+var isAndroid = (navigator.userAgent.toLowerCase().indexOf("android") > -1);
$(function() {
// 선택옵션
@@ -35,9 +36,15 @@ $(function() {
}
});
- $("select[name='it_option[]']").live("mousedown", function() {
- option_add = true;
- });
+ if(isAndroid) {
+ $("select[name='it_option[]']").live("touchend", function() {
+ option_add = true;
+ });
+ } else {
+ $("select[name='it_option[]']").live("mousedown", function() {
+ option_add = true;
+ });
+ }
$("select[name='it_option[]']").live("change", function() {
var sel_count = $("select[name='it_option[]']").size();
@@ -129,9 +136,15 @@ $(function() {
}
});
- $("select[name='it_supply[]']").live("mousedown", function() {
- supply_add = true;
- });
+ if(isAndroid) {
+ $("select[name='it_supply[]']").live("touchend", function() {
+ supply_add = true;
+ });
+ } else {
+ $("select[name='it_supply[]']").live("mousedown", function() {
+ supply_add = true;
+ });
+ }
$("select[name='it_supply[]']").live("change", function() {
var $el = $(this);
diff --git a/mobile/shop/kcp/order_approval_form.php b/mobile/shop/kcp/order_approval_form.php
index b9ab36776..1f2bec3b0 100644
--- a/mobile/shop/kcp/order_approval_form.php
+++ b/mobile/shop/kcp/order_approval_form.php
@@ -203,11 +203,13 @@
of.param_opt_3.value = "";
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();
diff --git a/mobile/shop/orderform.php b/mobile/shop/orderform.php
index 975a5af4f..bef131349 100644
--- a/mobile/shop/orderform.php
+++ b/mobile/shop/orderform.php
@@ -338,7 +338,7 @@ ob_end_clean();
-
@@ -1118,77 +1124,25 @@ function calculate_tax()
}
/* 결제방법에 따른 처리 후 결제등록요청 실행 */
+var settle_method = "";
+var temp_point = 0;
+
function kcp_approval()
{
var f = document.sm_form;
var pf = document.forderform;
- var settle_case = document.getElementsByName("od_settle_case");
- var settle_check = false;
- var settle_method = "";
- for (i=0; i
;
- var max_point = 0;
- if (typeof(pf.max_temp_point) != "undefined")
- max_point = parseInt(pf.max_temp_point.value);
+ // 금액체크
+ if(!payment_check(pf))
+ return false;
- if (typeof(pf.od_temp_point) != "undefined") {
- if (pf.od_temp_point.value)
- {
- if (pf.od_temp_point.value)
- {
- temp_point = parseInt(pf.od_temp_point.value);
-
- if (temp_point < 0) {
- alert("포인트를 0 이상 입력하세요.");
- pf.od_temp_point.select();
- return false;
- }
-
- if (temp_point > tot_amount) {
- alert("주문금액 보다 많이 포인트결제할 수 없습니다.");
- pf.od_temp_point.select();
- return false;
- }
-
- if (temp_point > ) {
- alert("회원님의 포인트보다 많이 결제할 수 없습니다.");
- pf.od_temp_point.select();
- return false;
- }
-
- if (temp_point > max_point) {
- alert(max_point + "점 이상 결제할 수 없습니다.");
- pf.od_temp_point.select();
- return false;
- }
-
- if (parseInt(parseInt(temp_point / 100) * 100) != temp_point) {
- alert("포인트를 100점 단위로 입력하세요.");
- 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;
- }
- }
- }
+ // 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;
@@ -1204,17 +1158,34 @@ function kcp_approval()
f.rcvr_add2.value = pf.od_b_addr2.value;
f.settle_method.value = settle_method;
-
- calculate_tax();
-
-
var new_win = window.open("about:blank", "tar_opener", "scrollbars=yes,resizable=yes");
f.target = "tar_opener";
f.submit();
}
-function forderform_check(f)
+function forderform_check()
+{
+ var f = document.forderform;
+
+ // 필드체크
+ if(!orderfield_check(f))
+ return false;
+
+ // 금액체크
+ if(!payment_check(f))
+ return false;
+
+ if(settle_method != "무통장" && f.res_cd.value != "0000") {
+ alert("결제등록요청 후 주문해 주십시오.");
+ return false;
+ }
+
+ f.submit();
+}
+
+// 주문폼 필드체크
+function orderfield_check(f)
{
errmsg = "";
errfld = "";
@@ -1271,7 +1242,6 @@ function forderform_check(f)
var settle_case = document.getElementsByName("od_settle_case");
var settle_check = false;
- var settle_method = "";
for (i=0; i;
if (typeof(f.max_temp_point) != "undefined")
var max_point = parseInt(f.max_temp_point.value);
- var temp_point = 0;
if (typeof(f.od_temp_point) != "undefined") {
if (f.od_temp_point.value)
{
@@ -1361,6 +1332,10 @@ function forderform_check(f)
}
}
+
+ calculate_tax();
+
+
return true;
}