merge 충돌 처리

This commit is contained in:
whitedot
2013-06-13 14:14:05 +09:00
12 changed files with 84 additions and 62 deletions

View File

@ -72,6 +72,7 @@ include_once('./_head.php');
a.ct_point,
a.ct_qty,
a.ct_status,
a.ct_send_cost,
b.ca_id,
b.ca_id2,
b.ca_id3
@ -114,7 +115,7 @@ include_once('./_head.php');
}
// 개별배송비 계산
if($default['de_send_cost_case'] == '개별') {
if($default['de_send_cost_case'] == '개별' && !$row['ct_send_cost']) {
$it_send_cost += get_item_sendcost($row['it_id'], $sum['price'], $sum['qty']);
}

View File

@ -19,7 +19,7 @@ $sql = " select * from {$g4['shop_cart_table']} where uq_id = '$uq_id' and it_id
$result = sql_query($sql);
// 판매가격
$sql2 = " select ct_price, it_name, ct_send_cost, ct_send_cost2
$sql2 = " select ct_price, it_name, ct_send_cost
from {$g4['shop_cart_table']} where uq_id = '$uq_id' and it_id = '$it_id' and ct_num = '0' ";
$row2 = sql_fetch($sql2);
@ -34,7 +34,6 @@ if(!mysql_num_rows($result))
<input type="hidden" name="it_name" value="<?php echo $row2['it_name']; ?>">
<input type="hidden" name="it_point" value="<?php echo $it_point; ?>">
<input type="hidden" name="ct_send_cost" value="<?php echo $row2['ct_send_cost']; ?>">
<input type="hidden" name="ct_send_cost2" value="<?php echo $row2['ct_send_cost2']; ?>">
<input type="hidden" name="total_price" value="">
<input type="hidden" name="sw_direct">
<?php

View File

@ -231,11 +231,11 @@ else if ($act == "optionmod") // 장바구니에서 옵션변경
// 장바구니에 Insert
$comma = '';
$sql = " INSERT INTO {$g4['shop_cart_table']}
( uq_id, it_id, it_name, ct_status, ct_price, ct_point, ct_point_use, ct_stock_use, ct_option, ct_qty, ct_num, io_id, io_type, io_price, ct_time, ct_ip, ct_direct, ct_send_cost, ct_send_cost2 )
( uq_id, it_id, it_name, ct_status, ct_price, ct_point, ct_point_use, ct_stock_use, ct_option, ct_qty, ct_num, io_id, io_type, io_price, ct_time, ct_ip, ct_direct, ct_send_cost )
VALUES ";
for($i=0; $i<$option_count; $i++) {
$sql .= $comma."( '$tmp_uq_id', '{$_POST['it_id']}', '{$_POST['it_name']}', '쇼핑', '{$_POST['it_price']}', '{$_POST['it_point']}', '0', '0', '{$_POST['io_value'][$i]}', '{$_POST['ct_qty'][$i]}', '$i', '{$_POST['io_id'][$i]}', '{$_POST['io_type'][$i]}', '{$_POST['io_price'][$i]}', '".G4_TIME_YMDHIS."', '$REMOTE_ADDR', '$sw_direct', '$ct_send_cost', '$ct_send_cost2' )";
$sql .= $comma."( '$tmp_uq_id', '{$_POST['it_id']}', '{$_POST['it_name']}', '쇼핑', '{$_POST['it_price']}', '{$_POST['it_point']}', '0', '0', '{$_POST['io_value'][$i]}', '{$_POST['ct_qty'][$i]}', '$i', '{$_POST['io_id'][$i]}', '{$_POST['io_type'][$i]}', '{$_POST['io_price'][$i]}', '".G4_TIME_YMDHIS."', '$REMOTE_ADDR', '$sw_direct', '$ct_send_cost' )";
$comma = ' , ';
}
@ -359,7 +359,7 @@ else // 장바구니에 담기
$ct_count = 0;
$comma = '';
$sql = " INSERT INTO {$g4['shop_cart_table']}
( uq_id, mb_id, it_id, it_name, ct_status, ct_price, ct_point, ct_point_use, ct_stock_use, ct_option, ct_qty, ct_num, io_id, io_type, io_price, ct_time, ct_ip, ct_send_cost, ct_send_cost2, ct_direct, ct_select )
( uq_id, mb_id, it_id, it_name, ct_status, ct_price, ct_point, ct_point_use, ct_stock_use, ct_option, ct_qty, ct_num, io_id, io_type, io_price, ct_time, ct_ip, ct_send_cost, ct_direct, ct_select )
VALUES ";
for($i=0; $i<$option_count; $i++) {
@ -380,7 +380,7 @@ else // 장바구니에 담기
continue;
}
$sql .= $comma."( '$tmp_uq_id', '{$member['mb_id']}', '{$_POST['it_id']}', '{$_POST['it_name']}', '쇼핑', '{$_POST['it_price']}', '{$_POST['it_point']}', '0', '0', '{$_POST['io_value'][$i]}', '{$_POST['ct_qty'][$i]}', '$ct_num', '{$_POST['io_id'][$i]}', '{$_POST['io_type'][$i]}', '{$_POST['io_price'][$i]}', '".G4_TIME_YMDHIS."', '$REMOTE_ADDR', '$it_send_cost', '$ct_send_cost2', '$sw_direct', '$ct_select' )";
$sql .= $comma."( '$tmp_uq_id', '{$member['mb_id']}', '{$_POST['it_id']}', '{$_POST['it_name']}', '쇼핑', '{$_POST['it_price']}', '{$_POST['it_point']}', '0', '0', '{$_POST['io_value'][$i]}', '{$_POST['ct_qty'][$i]}', '$ct_num', '{$_POST['io_id'][$i]}', '{$_POST['io_type'][$i]}', '{$_POST['io_price'][$i]}', '".G4_TIME_YMDHIS."', '$REMOTE_ADDR', '$ct_send_cost', '$sw_direct', '$ct_select' )";
$comma = ' , ';
$ct_num++;
$ct_count++;

View File

@ -347,24 +347,16 @@ else
<?php } ?>
<?php if($default['de_send_cost_case'] == '개별' && $it['it_sc_type'] != 0) { ?>
<tr>
<th><label for="ct_send_cost2">배송비결제</label></th>
<th><label for="ct_send_cost">배송비결제</label></th>
<td>
<?php
if($it['it_sc_method'] == 2) {
?>
<select name="ct_send_cost2" id="ct_send_cost2">
<select name="ct_send_cost" id="ct_send_cost">
<option value="0">주문시 결제</option>
<option value="1">수령후 지불</option>
</select>
<?php
} else {
if($it['it_sc_method']) {
echo '<input type="hidden" name="ct_send_cost2" value="1">';
echo '수령후 지불';
} else {
echo '<input type="hidden" name="ct_send_cost2" value="0">';
echo '주문시 결제';
}
}
?>
</td>
@ -585,7 +577,7 @@ else
<div id="itemuse"></div>
<script>
$(function(){
$("#itemuse").load("./itemuse.php", {it_id:<?php echo $it_id; ?>});
$("#itemuse").load("./itemuse.php", {it_id:"<?php echo $it_id; ?>"});
});
</script>
</section>

View File

@ -140,6 +140,7 @@ setTimeout("init_pay_button();",300);
a.ct_point,
a.ct_qty,
a.ct_status,
a.ct_send_cost,
b.ca_id,
b.ca_id2,
b.ca_id3
@ -155,6 +156,7 @@ setTimeout("init_pay_button();",300);
$result = sql_query($sql);
$good_info = '';
$it_send_cost = 0;
for ($i=0; $row=mysql_fetch_array($result); $i++)
{
@ -195,6 +197,11 @@ setTimeout("init_pay_button();",300);
$it_name .= '<div class="sod_bsk_itopt">'.$it_options.'</div>';
}
// 개별배송비 계산
if($default['de_send_cost_case'] == '개별' && !$row['ct_send_cost']) {
$it_send_cost += get_item_sendcost($row['it_id'], $sum['price'], $sum['qty']);
}
$point = $sum['point'];
$sell_amount = $sum['price'];
@ -250,18 +257,20 @@ setTimeout("init_pay_button();",300);
// 배송비 계산
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;
}
}
?>

View File

@ -172,20 +172,40 @@ if ((int)($row['od_amount'] - $tot_cp_amount) !== $i_amount) {
// 배송비가 상이함
$tot_sell_amount = $row['od_amount'];
// 배송비 계산
if ($default['de_send_cost_case'] == "없음") {
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 = 0;
$sql = " select it_id
from {$g4['shop_cart_table']}
where uq_id = '$tmp_uq_id'
and ct_select = '1'
and ct_num = '0'
and ct_send_cost = '0' ";
$result = sql_query($sql);
for($i=0; $sc=sql_fetch_array($result); $i++) {
// 합계
$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 {$g4['shop_cart_table']}
where it_id = '{$sc['it_id']}'
and uq_id = '$tmp_uq_id' ";
$sum = sql_fetch($sql);
$send_cost += get_item_sendcost($sc['it_id'], $sum['price'], $sum['qty']);
}
}
$tot_sc_cp_amount = 0;