From 5d8a5a996adefc5691750db752cbc1e07beca3c8 Mon Sep 17 00:00:00 2001 From: chicpro Date: Wed, 9 Mar 2016 14:55:53 +0900 Subject: [PATCH] =?UTF-8?q?get=5Fsendcost=20=ED=95=A8=EC=88=98=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/shop.lib.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/shop.lib.php b/lib/shop.lib.php index 657c16a7e..d1754e7be 100644 --- a/lib/shop.lib.php +++ b/lib/shop.lib.php @@ -1704,6 +1704,7 @@ function get_sendcost($cart_id, $selected=1) $send_cost = 0; $total_price = 0; $total_send_cost = 0; + $diff = 0; $sql = " select distinct it_id from {$g5['g5_shop_cart_table']} @@ -1729,12 +1730,14 @@ function get_sendcost($cart_id, $selected=1) if($send_cost > 0) $total_send_cost += $send_cost; - if($default['de_send_cost_case'] == '차등' && $send_cost == -1) + if($default['de_send_cost_case'] == '차등' && $send_cost == -1) { $total_price += $sum['price']; + $diff++; + } } $send_cost = 0; - if($default['de_send_cost_case'] == '차등' && $total_price >= 0) { + if($default['de_send_cost_case'] == '차등' && $total_price >= 0 && $diff > 0) { // 금액별차등 : 여러단계의 배송비 적용 가능 $send_cost_limit = explode(";", $default['de_send_cost_limit']); $send_cost_list = explode(";", $default['de_send_cost_list']);