조건부 무료 상품의 경우 배송비가 0일 때 무료로 표시되도록 수정

This commit is contained in:
chicpro
2014-07-11 10:16:18 +09:00
parent bc043172fe
commit e8756f56b6
9 changed files with 151 additions and 6 deletions

View File

@ -13,6 +13,7 @@ $sql = " select a.ct_id,
a.ct_qty,
a.ct_status,
a.ct_send_cost,
a.it_sc_type,
b.ca_id
from {$g5['g5_shop_cart_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id )
where a.od_id = '$s_cart_id' ";
@ -88,6 +89,14 @@ $cart_count = mysql_num_rows($result);
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'];
?>

View File

@ -57,6 +57,7 @@ ob_start();
a.ct_qty,
a.ct_status,
a.ct_send_cost,
a.it_sc_type,
b.ca_id,
b.ca_id2,
b.ca_id3,
@ -180,6 +181,14 @@ ob_start();
$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 = '무료';
}
?>
<li class="sod_li">

View File

@ -43,7 +43,7 @@ if($od['od_pg'] == 'lg') {
$st_count1 = $st_count2 = 0;
$custom_cancel = false;
$sql = " select it_id, it_name, cp_price, ct_send_cost
$sql = " select it_id, it_name, cp_price, ct_send_cost, it_sc_type
from {$g5['g5_shop_cart_table']}
where od_id = '$od_id'
group by it_id
@ -65,6 +65,14 @@ if($od['od_pg'] == 'lg') {
order by io_type asc, ct_id asc ";
$res = sql_query($sql);
// 합계금액 계산
$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'])
{
@ -78,6 +86,14 @@ if($od['od_pg'] == 'lg') {
$ct_send_cost = '선불';
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 = '무료';
}
?>
<li class="sod_li">
<div class="li_name">