#300 배송비 관련 코드 수정
This commit is contained in:
@ -621,18 +621,17 @@ $pg_anchor = '<ul class="anchor">
|
||||
<tr>
|
||||
<th scope="row"><label for="de_send_cost_case">배송비유형</label></th>
|
||||
<td>
|
||||
<?php echo help("<strong>상한</strong>으로 설정한 경우, 주문총액이 배송비상한가 미만일 경우 배송비를 받습니다.\n<strong>없음</strong>으로 설정한 경우, 배송비상한가 및 배송비를 무시하며 착불의 경우도 없음으로 설정됩니다.\n<strong>개별배송비</strong>로 설정한 경우, 개별 상품의 배송비 설정이 적용됩니다.", 50); ?>
|
||||
<?php echo help("<strong>금액별차등</strong>으로 설정한 경우, 주문총액이 배송비상한가 미만일 경우 배송비를 받습니다.\n<strong>무료배송</strong>으로 설정한 경우, 배송비상한가 및 배송비를 무시하며 착불의 경우도 무료배송으로 설정합니다.\n<strong>상품별로 배송비 설정을 한 경우 상품별 배송비 설정이 우선</strong> 적용됩니다.\n예를 들어 무료배송으로 설정했을 때 특정 상품에 배송비가 설정되어 있으면 주문시 배송비가 부과됩니다.", 50); ?>
|
||||
<select name="de_send_cost_case" id="de_send_cost_case">
|
||||
<option value="상한" <?php echo get_selected($default['de_send_cost_case'], "상한"); ?>>상한</option>
|
||||
<option value="없음" <?php echo get_selected($default['de_send_cost_case'], "없음"); ?>>없음</option>
|
||||
<option value="개별" <?php echo get_selected($default['de_send_cost_case'], "개별"); ?>>개별배송비</option>
|
||||
<option value="차등" <?php echo get_selected($default['de_send_cost_case'], "차등"); ?>>금액별차등</option>
|
||||
<option value="무료" <?php echo get_selected($default['de_send_cost_case'], "무료"); ?>>무료배송</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="de_send_cost_limit">배송비상한가</label></th>
|
||||
<td>
|
||||
<?php echo help("배송비유형이 '상한'일 경우에만 해당되며 배송비상한가를 여러개 두고자 하는 경우는 <b>;</b> 로 구분합니다.\n\n예를 들어 20000원 미만일 경우 4000원, 30000원 미만일 경우 3000원 으로 사용할 경우에는 배송비상한가를 20000;30000 으로 입력하고 배송비를 4000;3000 으로 입력합니다.", 50); ?>
|
||||
<?php echo help("배송비유형이 '금액별차등'일 경우에만 해당되며 배송비상한가를 여러개 두고자 하는 경우는 <b>;</b> 로 구분합니다.\n\n예를 들어 20000원 미만일 경우 4000원, 30000원 미만일 경우 3000원 으로 사용할 경우에는 배송비상한가를 20000;30000 으로 입력하고 배송비를 4000;3000 으로 입력합니다.", 50); ?>
|
||||
<input type="text" name="de_send_cost_limit" value="<?php echo $default['de_send_cost_limit']; ?>" size="40" class="frm_input" id="de_send_cost_limit"> 원
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -847,7 +847,7 @@ $(function(){
|
||||
<section id="anc_sitfrm_sendcost" class="cbox">
|
||||
<h2>배송비</h2>
|
||||
<?php echo $pg_anchor; ?>
|
||||
<p>쇼핑몰설정 > 배송비유형 설정에서 <strong>개별배송비</strong>로 설정해야만 아래 설정이 적용됩니다.</p>
|
||||
<p>쇼핑몰설정 > 배송비유형 설정보다 <strong>개별상품 배송비설정이 우선</strong> 적용됩니다.</p>
|
||||
|
||||
<table class="frm_tbl">
|
||||
<colgroup>
|
||||
@ -861,10 +861,11 @@ $(function(){
|
||||
<td>
|
||||
<?php echo help("배송비 유형을 선택하면 자동으로 항목이 변환됩니다."); ?>
|
||||
<select name="it_sc_type" id="it_sc_type">
|
||||
<option value="0"<?php echo get_selected('0', $it['it_sc_type']); ?>>무료배송</option>
|
||||
<option value="1"<?php echo get_selected('1', $it['it_sc_type']); ?>>조건부 무료배송</option>
|
||||
<option value="2"<?php echo get_selected('2', $it['it_sc_type']); ?>>유료배송</option>
|
||||
<option value="3"<?php echo get_selected('3', $it['it_sc_type']); ?>>수량별 부과</option>
|
||||
<option value="0"<?php echo get_selected('0', $it['it_sc_type']); ?>>쇼핑몰 기본설정 사용</option>
|
||||
<option value="1"<?php echo get_selected('1', $it['it_sc_type']); ?>>무료배송</option>
|
||||
<option value="2"<?php echo get_selected('2', $it['it_sc_type']); ?>>조건부 무료배송</option>
|
||||
<option value="3"<?php echo get_selected('3', $it['it_sc_type']); ?>>유료배송</option>
|
||||
<option value="4"<?php echo get_selected('4', $it['it_sc_type']); ?>>수량별 부과</option>
|
||||
</select>
|
||||
</td>
|
||||
<td rowspan="4" id="sc_grp" class="group_setting">
|
||||
@ -874,7 +875,7 @@ $(function(){
|
||||
<label for="chk_all_it_sendcost">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr id="sc_con_method">
|
||||
<th scope="row"><label for="it_sc_method">배송비 결제</label></th>
|
||||
<td>
|
||||
<select name="it_sc_method" id="it_sc_method">
|
||||
@ -884,7 +885,7 @@ $(function(){
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr id="sc_con_basic">
|
||||
<th scope="row"><label for="it_sc_price">기본배송비</label></th>
|
||||
<td>
|
||||
<?php echo help("무료배송 이외의 설정에 적용되는 배송비 금액입니다."); ?>
|
||||
@ -910,31 +911,69 @@ $(function(){
|
||||
<script>
|
||||
$(function() {
|
||||
<?php
|
||||
if($it['it_sc_type'] == 1) {
|
||||
echo '$("#sc_con_minimum").show();'.PHP_EOL;
|
||||
echo '$("#sc_con_qty").hide();'.PHP_EOL;
|
||||
} else if($it['it_sc_type'] == 3) {
|
||||
echo '$("#sc_con_minimum").hide();'.PHP_EOL;
|
||||
echo '$("#sc_con_qty").show();'.PHP_EOL;
|
||||
} else {
|
||||
echo '$("#sc_con_minimum").hide();'.PHP_EOL;
|
||||
echo '$("#sc_con_qty").hide();'.PHP_EOL;
|
||||
switch($it['it_sc_type']) {
|
||||
case 2:
|
||||
echo '$("#sc_con_method").show();'.PHP_EOL;
|
||||
echo '$("#sc_con_basic").show();'.PHP_EOL;
|
||||
echo '$("#sc_con_minimum").show();'.PHP_EOL;
|
||||
echo '$("#sc_con_qty").hide();'.PHP_EOL;
|
||||
echo '$("#sc_grp").attr("rowspan","4");'.PHP_EOL;
|
||||
break;
|
||||
case 3:
|
||||
echo '$("#sc_con_method").show();'.PHP_EOL;
|
||||
echo '$("#sc_con_basic").show();'.PHP_EOL;
|
||||
echo '$("#sc_con_minimum").hide();'.PHP_EOL;
|
||||
echo '$("#sc_con_qty").hide();'.PHP_EOL;
|
||||
echo '$("#sc_grp").attr("rowspan","3");'.PHP_EOL;
|
||||
break;
|
||||
case 4:
|
||||
echo '$("#sc_con_method").show();'.PHP_EOL;
|
||||
echo '$("#sc_con_basic").show();'.PHP_EOL;
|
||||
echo '$("#sc_con_minimum").hide();'.PHP_EOL;
|
||||
echo '$("#sc_con_qty").show();'.PHP_EOL;
|
||||
echo '$("#sc_grp").attr("rowspan","4");'.PHP_EOL;
|
||||
break;
|
||||
default:
|
||||
echo '$("#sc_con_method").hide();'.PHP_EOL;
|
||||
echo '$("#sc_con_basic").hide();'.PHP_EOL;
|
||||
echo '$("#sc_con_minimum").hide();'.PHP_EOL;
|
||||
echo '$("#sc_con_qty").hide();'.PHP_EOL;
|
||||
echo '$("#sc_grp").attr("rowspan","1");'.PHP_EOL;
|
||||
break;
|
||||
}
|
||||
?>
|
||||
$("#it_sc_type").change(function() {
|
||||
var type = $(this).val();
|
||||
if(type == "1") {
|
||||
$("#sc_con_minimum").show();
|
||||
$("#sc_con_qty").hide();
|
||||
$("#sc_grp").attr('rowspan','4');
|
||||
} else if(type == "3") {
|
||||
$("#sc_con_minimum").hide();
|
||||
$("#sc_con_qty").show();
|
||||
$("#sc_grp").attr('rowspan','4');
|
||||
} else {
|
||||
$("#sc_con_minimum").hide();
|
||||
$("#sc_con_qty").hide();
|
||||
$("#sc_grp").attr('rowspan','3');
|
||||
|
||||
switch(type) {
|
||||
case "2":
|
||||
$("#sc_con_method").show();
|
||||
$("#sc_con_basic").show();
|
||||
$("#sc_con_minimum").show();
|
||||
$("#sc_con_qty").hide();
|
||||
$("#sc_grp").attr("rowspan","4");
|
||||
break;
|
||||
case "3":
|
||||
$("#sc_con_method").show();
|
||||
$("#sc_con_basic").show();
|
||||
$("#sc_con_minimum").hide();
|
||||
$("#sc_con_qty").hide();
|
||||
$("#sc_grp").attr("rowspan","3");
|
||||
break;
|
||||
case "4":
|
||||
$("#sc_con_method").show();
|
||||
$("#sc_con_basic").show();
|
||||
$("#sc_con_minimum").hide();
|
||||
$("#sc_con_qty").show();
|
||||
$("#sc_grp").attr("rowspan","4");
|
||||
break;
|
||||
default:
|
||||
$("#sc_con_method").hide();
|
||||
$("#sc_con_basic").hide();
|
||||
$("#sc_con_minimum").hide();
|
||||
$("#sc_con_qty").hide();
|
||||
$("#sc_grp").attr("rowspan","1");
|
||||
break;
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -1412,18 +1451,18 @@ function fitemformcheck(f)
|
||||
}
|
||||
}
|
||||
|
||||
if(f.it_sc_type.value != "0") {
|
||||
if(parseInt(f.it_sc_type.value) > 1) {
|
||||
if(!f.it_sc_price.value || f.it_sc_price.value == "0") {
|
||||
alert("기본배송비를 입력해 주십시오.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(f.it_sc_type.value == "1" && (!f.it_sc_minimum.value || f.it_sc_minimum.value == "0")) {
|
||||
if(f.it_sc_type.value == "2" && (!f.it_sc_minimum.value || f.it_sc_minimum.value == "0")) {
|
||||
alert("배송비 상세조건의 주문금액을 입력해 주십시오.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(f.it_sc_type.value == "3" && (!f.it_sc_qty.value || f.it_sc_qty.value == "0")) {
|
||||
if(f.it_sc_type.value == "4" && (!f.it_sc_qty.value || f.it_sc_qty.value == "0")) {
|
||||
alert("배송비 상세조건의 주문수량을 입력해 주십시오.");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -175,7 +175,7 @@ $cart_coupon = $sum['coupon'];
|
||||
$cart_count = $sum['cnt'];
|
||||
|
||||
// 배송비
|
||||
$send_cost = get_sendcost($cart_price, $od_id);
|
||||
$send_cost = get_sendcost($od_id);
|
||||
|
||||
$tot_od_cp_price = $tot_sc_cp_price = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user