#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

@ -46,7 +46,7 @@ include_once(G4_MSHOP_PATH.'/_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++)
{
@ -74,6 +74,11 @@ include_once(G4_MSHOP_PATH.'/_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'];
?>
@ -104,18 +109,20 @@ include_once(G4_MSHOP_PATH.'/_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;
}
}
?>