From 09328567458ad210eeeefa281fc5554610eb7129 Mon Sep 17 00:00:00 2001 From: thisgun Date: Tue, 7 Apr 2020 10:51:51 +0900 Subject: [PATCH] =?UTF-8?q?=EB=84=A4=EC=9D=B4=EB=B2=84=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=20=EB=B0=B0=EC=86=A1=EB=B9=84=20=EA=B4=80=EB=A0=A8=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/naverpay.lib.php | 2 +- shop/naverpay/naverpay_order.php | 27 +++++++++++++++------------ 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/lib/naverpay.lib.php b/lib/naverpay.lib.php index 6d1ab6d8c..853a9b4d8 100644 --- a/lib/naverpay.lib.php +++ b/lib/naverpay.lib.php @@ -38,7 +38,7 @@ class naverpay_register if(!$it['it_id']) continue; - if($it['it_sc_method'] == 1) { // 착불 + if($it['it_sc_type'] > 1 && $it['it_sc_method'] == 1) { // 착불 $cnt++; continue; } diff --git a/shop/naverpay/naverpay_order.php b/shop/naverpay/naverpay_order.php index 81799ab58..d96b31cb8 100644 --- a/shop/naverpay/naverpay_order.php +++ b/shop/naverpay/naverpay_order.php @@ -201,22 +201,25 @@ for($i=0; $i<$count; $i++) { if((int)$it_price + (int)$io_price <= 0) return_error2json('구매금액이 음수 또는 0원인 상품은 구매할 수 없습니다.'); } + + $ct_send_cost = 0; + if($ct_send_cost != 1) { // + if( $is_cart && !empty($_POST['ct_send_cost'][$it_id][$k]) ){ - if( $is_cart && !empty($_POST['ct_send_cost'][$it_id][$k]) ){ + $ct_send_cost = $_POST['ct_send_cost'][$it_id][$k]; - $ct_send_cost = $_POST['ct_send_cost'][$it_id][$k]; + } else { + // 배송비결제 + if($it['it_sc_type'] == 1) + $ct_send_cost = 2; // 무료 + else if($it['it_sc_type'] > 1 && $it['it_sc_method'] == 1) + $ct_send_cost = 1; // 착불 + } - } else { - // 배송비결제 - if($it['it_sc_type'] == 1) + // 조건부 무료배송시 착불일 경우 ( 야수님이 알려주심 ) + if ($it['it_sc_type'] === 2 && $ct_send_cost === 1 && ((int)$io_price + (int)$it_price) * $ct_qty >= $it['it_sc_minimum'] ){ $ct_send_cost = 2; // 무료 - else if($it['it_sc_type'] > 1 && $it['it_sc_method'] == 1) - $ct_send_cost = 1; // 착불 - } - - // 조건부 무료배송시 착불일 경우 ( 야수님이 알려주심 ) - if ($it['it_sc_type'] === 2 && $ct_send_cost === 1 && ((int)$io_price + (int)$it_price) * $ct_qty >= $it['it_sc_minimum'] ){ - $ct_send_cost = 2; // 무료 + } } // 옵션정보배열에 저장