diff --git a/shop/cart.php b/shop/cart.php
index 569195ea2..ec799ea14 100644
--- a/shop/cart.php
+++ b/shop/cart.php
@@ -57,6 +57,7 @@ include_once('./_head.php');
a.ct_qty,
a.ct_status,
a.ct_send_cost,
+ a.it_sc_type,
b.ca_id,
b.ca_id2,
b.ca_id3
@@ -112,6 +113,14 @@ include_once('./_head.php');
break;
}
+ // 조건부무료
+ if($row['it_sc_type'] == 2) {
+ $sendcost = get_item_sendcost($row['it_id'], $sum['price'], $sum['qty'], $s_cart_id);
+
+ if($sendcost == 0)
+ $ct_send_cost = '무료';
+ }
+
$point = $sum['point'];
$sell_price = $sum['price'];
?>
diff --git a/shop/orderform.php b/shop/orderform.php
index 39ef9ea3b..0d21da4c2 100644
--- a/shop/orderform.php
+++ b/shop/orderform.php
@@ -85,6 +85,7 @@ require_once('./'.$default['de_pg_service'].'/orderform.1.php');
a.ct_qty,
a.ct_status,
a.ct_send_cost,
+ a.it_sc_type,
b.ca_id,
b.ca_id2,
b.ca_id3,
@@ -204,6 +205,14 @@ require_once('./'.$default['de_pg_service'].'/orderform.1.php');
$ct_send_cost = '선불';
break;
}
+
+ // 조건부무료
+ if($row['it_sc_type'] == 2) {
+ $sendcost = get_item_sendcost($row['it_id'], $sum['price'], $sum['qty'], $s_cart_id);
+
+ if($sendcost == 0)
+ $ct_send_cost = '무료';
+ }
?>
diff --git a/shop/orderinquiryview.php b/shop/orderinquiryview.php
index e36c9db9e..e1cd86f33 100644
--- a/shop/orderinquiryview.php
+++ b/shop/orderinquiryview.php
@@ -49,7 +49,7 @@ if($od['od_pg'] == 'lg') {
$st_count1 = $st_count2 = 0;
$custom_cancel = false;
- $sql = " select it_id, it_name, ct_send_cost
+ $sql = " select it_id, it_name, ct_send_cost, it_sc_type
from {$g5['g5_shop_cart_table']}
where od_id = '$od_id'
group by it_id
@@ -86,6 +86,14 @@ if($od['od_pg'] == 'lg') {
$res = sql_query($sql);
$rowspan = mysql_num_rows($res) + 1;
+ // 합계금액 계산
+ $sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price,
+ SUM(ct_qty) as qty
+ from {$g5['g5_shop_cart_table']}
+ where it_id = '{$row['it_id']}'
+ and od_id = '$od_id' ";
+ $sum = sql_fetch($sql);
+
// 배송비
switch($row['ct_send_cost'])
{
@@ -100,6 +108,14 @@ if($od['od_pg'] == 'lg') {
break;
}
+ // 조건부무료
+ if($row['it_sc_type'] == 2) {
+ $sendcost = get_item_sendcost($row['it_id'], $sum['price'], $sum['qty'], $od_id);
+
+ if($sendcost == 0)
+ $ct_send_cost = '무료';
+ }
+
for($k=0; $opt=sql_fetch_array($res); $k++) {
if($opt['io_type'])
$opt_price = $opt['io_price'];