From 6d6dd47f2ecc25379ca05760f48abb4788a681fa Mon Sep 17 00:00:00 2001 From: thisgun Date: Tue, 26 Jan 2021 10:05:36 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A3=BC=EB=AC=B8=ED=8F=BC=EC=97=90=EC=84=9C?= =?UTF-8?q?=20=EC=BF=A0=ED=8F=B0=20=EC=A0=81=EC=9A=A9=20=EB=A0=88=EC=9D=B4?= =?UTF-8?q?=EC=96=B4=EC=97=90=EC=84=9C=20=EB=B6=88=ED=95=84=EC=9A=94?= =?UTF-8?q?=ED=95=9C=20=ED=83=9C=EA=B7=B8=EA=B0=80=20=EB=82=A8=EC=95=84?= =?UTF-8?q?=EC=9E=88=EB=8A=94=20=ED=98=84=EC=83=81=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/shop_admin/couponzoneformupdate.php | 4 ++-- mobile/shop/orderform.sub.php | 12 ++++++++++++ shop/orderform.sub.php | 12 ++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/adm/shop_admin/couponzoneformupdate.php b/adm/shop_admin/couponzoneformupdate.php index e65457d93..79a5a445a 100644 --- a/adm/shop_admin/couponzoneformupdate.php +++ b/adm/shop_admin/couponzoneformupdate.php @@ -120,10 +120,10 @@ if($w == '') { $sql = " select * from {$g5['g5_shop_coupon_zone_table']} where cz_id = '$cz_id' "; $cp = sql_fetch($sql); - if(!$cp['cz_id']) + if(! (isset($cp['cz_id']) && $cp['cz_id'])) alert('쿠폰정보가 존재하지 않습니다.', './couponzonelist.php'); - if ($_POST['cp_img_del'] && $cp['cz_file']) { + if ((isset($_POST['cp_img_del']) && $_POST['cp_img_del']) && $cp['cz_file']) { @unlink(G5_DATA_PATH."/coupon/{$cp['cz_file']}"); $cp['cz_file'] = ''; } diff --git a/mobile/shop/orderform.sub.php b/mobile/shop/orderform.sub.php index ebd80b434..da04d532a 100644 --- a/mobile/shop/orderform.sub.php +++ b/mobile/shop/orderform.sub.php @@ -866,6 +866,9 @@ $(function() { }); $("#od_coupon_btn").click(function() { + if( $("#od_coupon_frm").parent(".od_coupon_wrap").length ){ + $("#od_coupon_frm").parent(".od_coupon_wrap").remove(); + } $("#od_coupon_frm").remove(); var $this = $(this); var price = parseInt($("input[name=org_od_price]").val()) - parseInt($("input[name=item_coupon]").val()); @@ -913,6 +916,9 @@ $(function() { $("#od_cp_price").text(number_format(String(price))); $("#sc_cp_price").text(0); calculate_order_price(); + if( $("#od_coupon_frm").parent(".od_coupon_wrap").length ){ + $("#od_coupon_frm").parent(".od_coupon_wrap").remove(); + } $("#od_coupon_frm").remove(); $("#od_coupon_btn").text("변경").focus(); if(!$("#od_coupon_cancel").length) @@ -920,6 +926,9 @@ $(function() { }); $(document).on("click", "#od_coupon_close", function() { + if( $("#od_coupon_frm").parent(".od_coupon_wrap").length ){ + $("#od_coupon_frm").parent(".od_coupon_wrap").remove(); + } $("#od_coupon_frm").remove(); $("#od_coupon_btn").focus(); }); @@ -934,6 +943,9 @@ $(function() { $("#od_cp_price").text(0); $("#sc_cp_price").text(0); calculate_order_price(); + if( $("#od_coupon_frm").parent(".od_coupon_wrap").length ){ + $("#od_coupon_frm").parent(".od_coupon_wrap").remove(); + } $("#od_coupon_frm").remove(); $("#od_coupon_btn").text("쿠폰적용").focus(); $(this).remove(); diff --git a/shop/orderform.sub.php b/shop/orderform.sub.php index db1d0e488..2d5ccf055 100644 --- a/shop/orderform.sub.php +++ b/shop/orderform.sub.php @@ -867,6 +867,9 @@ $(function() { }); $("#od_coupon_btn").click(function() { + if( $("#od_coupon_frm").parent(".od_coupon_wrap").length ){ + $("#od_coupon_frm").parent(".od_coupon_wrap").remove(); + } $("#od_coupon_frm").remove(); var $this = $(this); var price = parseInt($("input[name=org_od_price]").val()) - parseInt($("input[name=item_coupon]").val()); @@ -914,6 +917,9 @@ $(function() { $("#od_cp_price").text(number_format(String(price))); $("#sc_cp_price").text(0); calculate_order_price(); + if( $("#od_coupon_frm").parent(".od_coupon_wrap").length ){ + $("#od_coupon_frm").parent(".od_coupon_wrap").remove(); + } $("#od_coupon_frm").remove(); $("#od_coupon_btn").text("변경").focus(); if(!$("#od_coupon_cancel").length) @@ -921,6 +927,9 @@ $(function() { }); $(document).on("click", "#od_coupon_close", function() { + if( $("#od_coupon_frm").parent(".od_coupon_wrap").length ){ + $("#od_coupon_frm").parent(".od_coupon_wrap").remove(); + } $("#od_coupon_frm").remove(); $("#od_coupon_btn").focus(); }); @@ -935,6 +944,9 @@ $(function() { $("#od_cp_price").text(0); $("#sc_cp_price").text(0); calculate_order_price(); + if( $("#od_coupon_frm").parent(".od_coupon_wrap").length ){ + $("#od_coupon_frm").parent(".od_coupon_wrap").remove(); + } $("#od_coupon_frm").remove(); $("#od_coupon_btn").text("쿠폰적용").focus(); $(this).remove();