포인트지급 기준금액 및 추가옵션 지급 포인트 설정 추가

This commit is contained in:
chicpro
2014-03-11 15:53:55 +09:00
parent 35318b54bf
commit d36a5a3fc1
12 changed files with 81 additions and 34 deletions

View File

@ -94,6 +94,12 @@ if(!sql_query(" select it_stock_sms from {$g5['g5_shop_item_table']} limit 1 ",
ADD `it_stock_sms` tinyint(4) NOT NULL DEFAULT '0' AFTER `it_stock_qty` ", true);
}
// 추가옵션 포인트 설정 필드 추가
if(!sql_query(" select it_supply_point from {$g5['g5_shop_item_table']} limit 1 ", false)) {
sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}`
ADD `it_supply_point` int(11) NOT NULL DEFAULT '0' AFTER `it_point_type` ", true);
}
$pg_anchor ='<ul class="anchor">
<li><a href="#anc_sitfrm_cate">상품분류</a></li>
<li><a href="#anc_sitfrm_ini">기본정보</a></li>
@ -483,15 +489,16 @@ $(function(){
<tr>
<th scope="row"><label for="it_point_type">포인트 유형</label></th>
<td>
<?php echo help("포인트 유형을 설정할 수 있습니다. 비율로 설정했을 경우 판매가격의 %비율로 포인트가 지급됩니다."); ?>
<?php echo help("포인트 유형을 설정할 수 있습니다. 비율로 설정했을 경우 설정 기준금액의 %비율로 포인트가 지급됩니다."); ?>
<select name="it_point_type" id="it_point_type">
<option value="0"<?php echo get_selected('0', $it['it_point_type']); ?>>금액</option>
<option value="1"<?php echo get_selected('1', $it['it_point_type']); ?>>비율</option>
<option value="0"<?php echo get_selected('0', $it['it_point_type']); ?>>설정금액</option>
<option value="1"<?php echo get_selected('1', $it['it_point_type']); ?>>판매가기준 설정비율</option>
<option value="2"<?php echo get_selected('2', $it['it_point_type']); ?>>구매가기준 설정비율</option>
</select>
<script>
$(function() {
$("#it_point_type").change(function() {
if($(this).val() == "1")
if(parseInt($(this).val()) > 0)
$("#it_point_unit").text("%");
else
$("#it_point_unit").text("점");
@ -509,7 +516,7 @@ $(function(){
<tr>
<th scope="row"><label for="it_point">포인트</label></th>
<td>
<?php echo help("주문완료후 환경설정에서 설정한 주문완료 설정일 후 회원에게 부여하는 포인트입니다.\n또, 포인트부여를 '아니오'로 설정한 경우 신용카드, 계좌이체로 주문하는 회원께는 부여하지 않습니다.\n게시판의 포인트 기능과는 별개로 동작합니다."); ?>
<?php echo help("주문완료후 환경설정에서 설정한 주문완료 설정일 후 회원에게 부여하는 포인트입니다.\n또, 포인트부여를 '아니오'로 설정한 경우 신용카드, 계좌이체로 주문하는 회원께는 부여하지 않습니다."); ?>
<input type="text" name="it_point" value="<?php echo $it['it_point']; ?>" id="it_point" class="frm_input" size="8"> <span id="it_point_unit"><?php if($it['it_point_type']) echo '%'; else echo '점'; ?></span>
</td>
<td class="td_grpset">
@ -519,6 +526,19 @@ $(function(){
<label for="chk_all_it_point">전체적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="it_supply_point">추가옵션상품 포인트</label></th>
<td>
<?php echo help("상품의 추가옵션상품 구매에 일괄적으로 지급하는 포인트입니다. 0으로 설정하시면 구매포인트를 지급하지 않습니다.\n주문완료후 환경설정에서 설정한 주문완료 설정일 후 회원에게 부여하는 포인트입니다.\n또, 포인트부여를 '아니오'로 설정한 경우 신용카드, 계좌이체로 주문하는 회원께는 부여하지 않습니다."); ?>
<input type="text" name="it_supply_point" value="<?php echo $it['it_supply_point']; ?>" id="it_supply_point" class="frm_input" size="8"> 점
</td>
<td class="td_grpset">
<input type="checkbox" name="chk_ca_it_supply_point" value="1" id="chk_ca_it_supply_point">
<label for="chk_ca_it_supply_point">분류적용</label>
<input type="checkbox" name="chk_all_it_supply_point" value="1" id="chk_all_it_supply_point">
<label for="chk_all_it_supply_point">전체적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="it_soldout">상품품절</label></th>
<td>

View File

@ -287,6 +287,7 @@ $sql_common = " ca_id = '$ca_id',
it_price = '$it_price',
it_point = '$it_point',
it_point_type = '$it_point_type',
it_supply_point = '$it_supply_point',
it_notax = '$it_notax',
it_sell_email = '$it_sell_email',
it_use = '$it_use',
@ -473,6 +474,7 @@ if(is_checked('chk_ca_it_price')) $ca_fields .= " , it_price = '$i
if(is_checked('chk_ca_it_cust_price')) $ca_fields .= " , it_cust_price = '$it_cust_price' ";
if(is_checked('chk_ca_it_point')) $ca_fields .= " , it_point = '$it_point' ";
if(is_checked('chk_ca_it_point_type')) $ca_fields .= " , it_point_type = '$it_point_type' ";
if(is_checked('chk_ca_it_supply_point')) $ca_fields .= " , it_supply_point = '$it_supply_point' ";
if(is_checked('chk_ca_it_stock_qty')) $ca_fields .= " , it_stock_qty = '$it_stock_qty' ";
if(is_checked('chk_ca_it_noti_qty')) $ca_fields .= " , it_noti_qty = '$it_noti_qty' ";
if(is_checked('chk_ca_it_sendcost')) $ca_fields .= " , it_sc_type = '$it_sc_type', it_sc_method = '$it_sc_method', it_sc_price = '$it_sc_price', it_sc_minimum = '$it_sc_minimum', it_sc_qty = '$it_sc_qty' ";
@ -521,6 +523,7 @@ if(is_checked('chk_all_it_price')) $all_fields .= " , it_price = '
if(is_checked('chk_all_it_cust_price')) $all_fields .= " , it_cust_price = '$it_cust_price' ";
if(is_checked('chk_all_it_point')) $all_fields .= " , it_point = '$it_point' ";
if(is_checked('chk_all_it_point_type')) $all_fields .= " , it_point_type = '$it_point_type' ";
if(is_checked('chk_all_it_supply_point')) $all_fields .= " , it_supply_point = '$it_supply_point' ";
if(is_checked('chk_all_it_stock_qty')) $all_fields .= " , it_stock_qty = '$it_stock_qty' ";
if(is_checked('chk_all_it_noti_qty')) $all_fields .= " , it_noti_qty = '$it_noti_qty' ";
if(is_checked('chk_all_it_sendcost')) $all_fields .= " , it_sc_type = '$it_sc_type', it_sc_method = '$it_sc_method', it_sc_price = '$it_sc_price', it_sc_minimum = '$it_sc_minimum', it_sc_qty = '$it_sc_qty' ";