#210 개별배송비 계산 코드 추가

This commit is contained in:
chicpro
2013-06-13 10:57:37 +09:00
parent c38c77fc75
commit bb013bbdd8
3 changed files with 25 additions and 30 deletions

View File

@ -64,9 +64,6 @@ include_once('./_head.php');
$tot_sell_amount = 0;
$tot_cancel_amount = 0;
$goods = $goods_it_id = "";
$goods_count = -1;
// $s_uq_id 로 현재 장바구니 자료 쿼리
$sql = " select a.ct_id,
a.it_id,
@ -88,7 +85,7 @@ include_once('./_head.php');
$sql .= " order by a.ct_id ";
$result = sql_query($sql);
$good_info = '';
$it_send_cost = 0;
for ($i=0; $row=mysql_fetch_array($result); $i++)
{
@ -116,6 +113,11 @@ include_once('./_head.php');
$it_name .= '<div class="sod_bsk_itopt">'.$it_options.'</div>';
}
// 개별배송비 계산
if($default['de_send_cost_case'] == '개별') {
$it_send_cost += get_item_sendcost($row['it_id'], $sum['price'], $sum['qty']);
}
$point = $sum['point'];
$sell_amount = $sum['price'];
?>
@ -153,26 +155,26 @@ include_once('./_head.php');
// 배송비 계산
if ($default['de_send_cost_case'] == '없음')
$send_cost = 0;
else {
else if($default['de_send_cost_case'] == '상한') {
// 배송비 상한 : 여러단계의 배송비 적용 가능
$send_cost_limit = explode(";", $default['de_send_cost_limit']);
$send_cost_list = explode(";", $default['de_send_cost_list']);
$send_cost = 0;
for ($k=0; $k<count($send_cost_limit); $k++) {
// 총판매금액이 배송비 상한가 보다 작다면
if ($tot_sell_amount < $send_cost_limit[$k]) {
$send_cost = $send_cost_list[$k];
if ($tot_sell_amount < preg_replace('/[^0-9]/', '', $send_cost_limit[$k])) {
$send_cost = preg_replace('/[^0-9]/', '', $send_cost_list[$k]);
break;
}
}
} else { // 개별배송
$send_cost = $it_send_cost;
}
}
?>
</tbody>
</table>
<?php if ($goods_count) $goods .= ' 외 '.$goods_count.'건'; ?>
<?php
// 배송비가 0 보다 크다면 (있다면)
if ($send_cost > 0)