From e118090634fe6b65db82e04dbb8793716ea39a6f Mon Sep 17 00:00:00 2001 From: thisgun Date: Mon, 27 May 2019 17:03:40 +0900 Subject: [PATCH] =?UTF-8?q?=EB=84=A4=EC=9D=B4=EB=B2=84=20=EA=B0=80?= =?UTF-8?q?=EA=B2=A9=EB=B9=84=EA=B5=90=20=ED=8E=98=EC=9D=B4=EC=A7=80=20?= =?UTF-8?q?=EC=BD=94=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/shop.lib.php | 26 +++++++++++++++----------- shop/price/naver.php | 2 +- shop/price/naver_summary.php | 2 +- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/lib/shop.lib.php b/lib/shop.lib.php index 96cb02c1d..b204caa6f 100644 --- a/lib/shop.lib.php +++ b/lib/shop.lib.php @@ -1867,19 +1867,23 @@ function get_item_sendcost2($it_id, $price, $qty) else { if($it['it_sc_type'] > 1) { - if($it['it_sc_type'] == 2) { // 조건부무료 - if($price >= $it['it_sc_minimum']) - $sendcost = 0; - else + if($it['it_sc_method'] == 1){ // 배송비 결제 설정이 착불인 경우 + $sendcost = -1; + } else { // 배송비 결제 설정이 선불 또는 사용자선택인 경우 + if($it['it_sc_type'] == 2) { // 조건부무료 + if($price >= $it['it_sc_minimum']) + $sendcost = 0; + else + $sendcost = $it['it_sc_price']; + } else if($it['it_sc_type'] == 3) { // 유료배송 $sendcost = $it['it_sc_price']; - } else if($it['it_sc_type'] == 3) { // 유료배송 - $sendcost = $it['it_sc_price']; - } else { // 수량별 부과 - if(!$it['it_sc_qty']) - $it['it_sc_qty'] = 1; + } else { // 수량별 부과 + if(!$it['it_sc_qty']) + $it['it_sc_qty'] = 1; - $q = ceil((int)$qty / (int)$it['it_sc_qty']); - $sendcost = (int)$it['it_sc_price'] * $q; + $q = ceil((int)$qty / (int)$it['it_sc_qty']); + $sendcost = (int)$it['it_sc_price'] * $q; + } } } else if($it['it_sc_type'] == 1) { // 무료배송 $sendcost = 0; diff --git a/shop/price/naver.php b/shop/price/naver.php index 17303a5e8..6d5e89796 100644 --- a/shop/price/naver.php +++ b/shop/price/naver.php @@ -40,7 +40,7 @@ ob_start(); echo "id{$tab}title{$tab}price_pc{$tab}link{$tab}image_link{$tab}category_name1{$tab}category_name2{$tab}category_name3{$tab}category_name4{$tab}model_number{$tab}brand{$tab}maker{$tab}origin{$tab}point{$tab}shipping"; -$sql =" select * from {$g5['g5_shop_item_table']} where it_use = '1' order by ca_id"; +$sql =" select * from {$g5['g5_shop_item_table']} where it_use = '1' and it_soldout = '0' and it_tel_inq = '0' and it_price > '0' order by ca_id"; $result = sql_query($sql); for ($i=0; $row=sql_fetch_array($result); $i++) diff --git a/shop/price/naver_summary.php b/shop/price/naver_summary.php index 72bcbfc23..d2621bd7f 100644 --- a/shop/price/naver_summary.php +++ b/shop/price/naver_summary.php @@ -40,7 +40,7 @@ ob_start(); echo "id{$tab}title{$tab}price_pc{$tab}link{$tab}image_link{$tab}category_name1{$tab}category_name2{$tab}category_name3{$tab}category_name4{$tab}model_number{$tab}brand{$tab}maker{$tab}origin{$tab}point{$tab}shipping{$tab}class{$tab}update_time"; -$sql =" select * from {$g5['g5_shop_item_table']} where it_use = '1' and substring(it_update_time, 1, 10) = '".G5_TIME_YMD."' order by ca_id"; +$sql =" select * from {$g5['g5_shop_item_table']} where it_use = '1' and it_soldout = '0' and it_tel_inq = '0' and it_price > '0' and substring(it_update_time, 1, 10) = '".G5_TIME_YMD."' order by ca_id"; $result = sql_query($sql); for ($i=0; $row=sql_fetch_array($result); $i++)