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++)