쇼핑몰관리자: #194 상품추가옵션 마크업 및 스타일 완료
This commit is contained in:
@ -344,7 +344,7 @@ $pg_anchor ='<ul class="anchor">
|
||||
<tr>
|
||||
<th scope="row">상품선택옵션</th>
|
||||
<td colspan="2">
|
||||
<div id="sit_option">
|
||||
<div class="sit_option">
|
||||
<?php echo help('옵션항목은 콤마(,) 로 구분하여 여러개를 입력할 수 있습니다. 예시) 라지,미디움,스몰'); ?>
|
||||
<table class="frm_tbl">
|
||||
<colgroup>
|
||||
@ -389,8 +389,7 @@ $pg_anchor ='<ul class="anchor">
|
||||
</div>
|
||||
</div>
|
||||
<div id="sit_option_frm"><?php include_once(G4_ADMIN_PATH.'/shop_admin/itemoption.php'); ?></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
<?php if($it['it_id'] && $po_run) { ?>
|
||||
@ -417,12 +416,10 @@ $pg_anchor ='<ul class="anchor">
|
||||
arr_opt3.push(opt3);
|
||||
});
|
||||
|
||||
|
||||
$("input[name=opt1]").val(arr_opt1.join());
|
||||
$("input[name=opt2]").val(arr_opt2.join());
|
||||
$("input[name=opt3]").val(arr_opt3.join());
|
||||
|
||||
if($("#option_table").height() > 500)
|
||||
$("#option_table").addClass("a");
|
||||
<?php } ?>
|
||||
// 옵션목록생성
|
||||
$("#option_table_create").click(function() {
|
||||
@ -432,7 +429,7 @@ $pg_anchor ='<ul class="anchor">
|
||||
var opt1 = $.trim($("#opt1").val());
|
||||
var opt2 = $.trim($("#opt2").val());
|
||||
var opt3 = $.trim($("#opt3").val());
|
||||
var $option_table = $("#option_table");
|
||||
var $option_table = $("#sit_option_frm");
|
||||
|
||||
if(!opt1_subject || !opt1) {
|
||||
alert("옵션명과 옵션항목을 입력해 주십시오.");
|
||||
@ -443,11 +440,7 @@ $pg_anchor ='<ul class="anchor">
|
||||
"<?php echo G4_ADMIN_URL; ?>/shop_admin/itemoption.php",
|
||||
{ opt1_subject: opt1_subject, opt2_subject: opt2_subject, opt3_subject: opt3_subject, opt1: opt1, opt2: opt2, opt3: opt3 },
|
||||
function(data) {
|
||||
$option_table.removeClass("a");
|
||||
$option_table.empty().html(data);
|
||||
if($option_table.height() > 500) {
|
||||
$option_table.addClass("a");
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
@ -486,28 +479,40 @@ $pg_anchor ='<ul class="anchor">
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">상품추가옵션</th>
|
||||
<td colspan="2">
|
||||
<div class="sit_option">
|
||||
<?php echo help('옵션항목은 콤마(,) 로 구분하여 여러개를 입력할 수 있습니다. 예시) 라지,미디움,스몰'); ?>
|
||||
<table class="frm_tbl">
|
||||
<colgroup>
|
||||
<col class="grid_4">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>추가옵션명</th>
|
||||
<th colspan="2">추가옵션항목(,로 구분)</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="text" name="spl_subject[]" value="" class="frm_input" size="15"></td>
|
||||
<td><input type="text" name="spl[]" value="" class="frm_input" size="50"></td>
|
||||
<td><button type="button" id="supply_table_create">옵션목록생성</button></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"><button type="button" id="add_supply_row">입력필드추가</button></td>
|
||||
<th>
|
||||
<label for="">추가<!-- ##################################################### 여기에 순번 삽입 --></label>
|
||||
<input type="text" name="spl_subject[]" id="name" value="" class="frm_input" size="15">
|
||||
</td>
|
||||
<td>
|
||||
<label for=""><b>추가<!-- ##################################################### 여기에 순번 삽입 --> 항목</b></label>
|
||||
<input type="text" name="spl[]" value="" class="frm_input" size="50">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="sit_option_addfrm_btn"><button type="button" id="add_supply_row" class="btn_frmline">옵션추가</button></div>
|
||||
<div class="btn_confirm">
|
||||
<button type="button" id="supply_table_create">옵션목록생성</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ##################################################### supply_table 을 sit_option_addfrm 으로 변경했으면 합니다. -->
|
||||
<div id="supply_table"><?php include_once(G4_ADMIN_PATH.'/shop_admin/itemsupply.php'); ?></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- ##################################################### tr 추가되는 위치를 새로 설정해야 할 것 같습니다. ㅠ -->
|
||||
<script>
|
||||
$(function() {
|
||||
// 입력필드추가
|
||||
@ -515,7 +520,7 @@ $pg_anchor ='<ul class="anchor">
|
||||
var $el = $(this).closest("tr");
|
||||
var fld = "<tr><td><input type=\"text\" name=\"spl_subject[]\" value=\"\" class=\"frm_input\" size=\"15\"></td>";
|
||||
fld += "<td><input type=\"text\" name=\"spl[]\" value=\"\" class=\"frm_input\" size=\"50\">";
|
||||
fld += "<button type=\"button\" id=\"del_supply_row\">삭제</button></td></tr>";
|
||||
fld += "<button type=\"button\" id=\"del_supply_row\" class=\"btn_frmline\">삭제</button></td></tr>";
|
||||
|
||||
$el.before(fld);
|
||||
|
||||
@ -603,6 +608,8 @@ $pg_anchor ='<ul class="anchor">
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="it_basic">기본설명</label></th>
|
||||
<td>
|
||||
|
||||
@ -15,18 +15,23 @@ if($it['it_id']) {
|
||||
|
||||
if($ps_run) {
|
||||
?>
|
||||
|
||||
<table class="frm_tbl">
|
||||
<tbody>
|
||||
<div class="sit_option_frm_wrapper">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td><input type="checkbox" name="spl_chk_all" value="1"></td>
|
||||
<td>옵션명</td>
|
||||
<td>옵션항목</td>
|
||||
<td>상품금액</td>
|
||||
<td>재고수량</td>
|
||||
<td>통보수량</td>
|
||||
<td>사용여부</td>
|
||||
<th scope="col">
|
||||
<label for="spl_chk_all" class="sound_only">전체 추가옵션</label>
|
||||
<input type="checkbox" name="spl_chk_all" value="1">
|
||||
</th>
|
||||
<th scope="col">옵션명</th>
|
||||
<th scope="col">옵션항목</th>
|
||||
<th scope="col">상품금액</th>
|
||||
<th scope="col">재고수량</th>
|
||||
<th scope="col">통보수량</th>
|
||||
<th scope="col">사용여부</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if($it['it_id']) {
|
||||
for($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
@ -40,15 +45,28 @@ if($it['it_id']) {
|
||||
$spl_use = $row['io_use'];
|
||||
?>
|
||||
<tr>
|
||||
<input type="hidden" name="spl_id[]" value="<?php echo $spl_id; ?>">
|
||||
<td><input type="checkbox" name="spl_chk[]" value="1"></td>
|
||||
<td class="td_chk">
|
||||
<input type="hidden" name="spl_id[]" value="<?php echo $spl_id; ?>">]
|
||||
<label for="spl_chk_<?php echo $i; ?>" class="sound_only"><?php echo $spl_subject.' '.$spl; ?></label>
|
||||
<input type="checkbox" name="spl_chk[]" id="spl_chk_<?php echo $i; ?>" value="1">
|
||||
</td>
|
||||
<td><?php echo $spl_subject; ?></td>
|
||||
<td><?php echo $spl; ?></td>
|
||||
<td><input type="text" name="spl_price[]" value="<?php echo $spl_price; ?>" class="frm_input" size="5"></td>
|
||||
<td><input type="text" name="spl_stock_qty[]" value="<?php echo $spl_stock_qty; ?>" class="frm_input" size="5"></td>
|
||||
<td><input type="text" name="spl_noti_qty[]" value="<?php echo $spl_noti_qty; ?>" class="frm_input" size="5"></td>
|
||||
<td>
|
||||
<select name="spl_use[]">
|
||||
<td class="td_bignum">
|
||||
<label for="spl_price_<?php echo $i; ?>" class="sound_only">상품금액</label>
|
||||
<input type="text" name="spl_price[]" value="<?php echo $spl_price; ?>" id="spl_price_<?php echo $i; ?>" class="frm_input" size="5">
|
||||
</td>
|
||||
<td class="td_num">
|
||||
<label for="spl_stock_qty_<?php echo $i; ?>" class="sound_only">재고수량</label>
|
||||
<input type="text" name="spl_stock_qty[]" value="<?php echo $spl_stock_qty; ?>" id="spl_stock_qty_<?php echo $i; ?>" class="frm_input" size="5">
|
||||
</td>
|
||||
<td class="td_num">
|
||||
<label for="spl_noti_qty_<?php echo $i; ?>" class="sound_only">통보수량</label>
|
||||
<input type="text" name="spl_noti_qty[]" value="<?php echo $spl_noti_qty; ?>" id="spl_noti_qty_<?php echo $i; ?>" class="frm_input" size="5">
|
||||
</td>
|
||||
<td class="td_mng">
|
||||
<label for="spl_use_<?php echo $i; ?>" class="sound_only">사용여부</label>
|
||||
<select name="spl_use[]" id="spl_use_<?php echo $i; ?>">
|
||||
<option value="1" <?php echo get_selected('1', $spl_use); ?>>사용함</option>
|
||||
<option value="0" <?php echo get_selected('0', $spl_use); ?>>사용안함</option>
|
||||
</select>
|
||||
@ -58,12 +76,12 @@ if($it['it_id']) {
|
||||
} // for
|
||||
} else {
|
||||
for($i=0; $i<$subject_count; $i++) {
|
||||
$spl_subject = strip_tags(trim($_POST['subject'][$i]));
|
||||
$spl_val = explode(',', strip_tags(trim($_POST['supply'][$i])));
|
||||
$spl_subject = trim($_POST['subject'][$i]);
|
||||
$spl_val = explode(',', trim($_POST['supply'][$i]));
|
||||
$spl_count = count($spl_val);
|
||||
|
||||
for($j=0; $j<$spl_count; $j++) {
|
||||
$spl = strip_tags(trim($spl_val[$j]));
|
||||
$spl = trim($spl_val[$j]);
|
||||
if($spl_subject && $spl) {
|
||||
$spl_id = $spl_subject.chr(30).$spl;
|
||||
$spl_price = 0;
|
||||
@ -72,15 +90,28 @@ if($it['it_id']) {
|
||||
$spl_use = 1;
|
||||
?>
|
||||
<tr>
|
||||
<td class="td_chk">
|
||||
<input type="hidden" name="spl_id[]" value="<?php echo $spl_id; ?>">
|
||||
<td><input type="checkbox" name="spl_chk[]" value="1"></td>
|
||||
<label for="spl_chk_<?php echo $i; ?>" class="sound_only"><?php echo $spl_subject.' '.$spl; ?></label>
|
||||
<input type="checkbox" name="spl_chk[]" id="spl_chk_<?php echo $i; ?>" value="1">
|
||||
</td>
|
||||
<td><?php echo $spl_subject; ?></td>
|
||||
<td><?php echo $spl; ?></td>
|
||||
<td><input type="text" name="spl_price[]" value="<?php echo $spl_price; ?>" class="frm_input" size="5"></td>
|
||||
<td><input type="text" name="spl_stock_qty[]" value="<?php echo $spl_stock_qty; ?>" class="frm_input" size="5"></td>
|
||||
<td><input type="text" name="spl_noti_qty[]" value="<?php echo $spl_noti_qty; ?>" class="frm_input" size="5"></td>
|
||||
<td>
|
||||
<select name="spl_use[]">
|
||||
<td class="td_bignum">
|
||||
<label for="spl_price_<?php echo $i; ?>" class="sound_only">상품금액</label>
|
||||
<input type="text" name="spl_price[]" value="<?php echo $spl_price; ?>" id="spl_price_<?php echo $i; ?>" class="frm_input" size="9">
|
||||
</td>
|
||||
<td class="td_num">
|
||||
<label for="spl_stock_qty_<?php echo $i; ?>" class="sound_only">재고수량</label>
|
||||
<input type="text" name="spl_stock_qty[]" value="<?php echo $spl_stock_qty; ?>" id="spl_stock_qty_<?php echo $i; ?>" class="frm_input" size="5">
|
||||
</td>
|
||||
<td class="td_num">
|
||||
<label for="spl_noti_qty_<?php echo $i; ?>" class="sound_only">통보수량</label>
|
||||
<input type="text" name="spl_noti_qty[]" value="<?php echo $spl_noti_qty; ?>" id="spl_noti_qty_<?php echo $i; ?>" class="frm_input" size="5">
|
||||
</td>
|
||||
<td class="td_mng">
|
||||
<label for="spl_use_<?php echo $i; ?>" class="sound_only">사용여부</label>
|
||||
<select name="spl_use[]" id="spl_use_<?php echo $i; ?>">
|
||||
<option value="1" <?php echo get_selected('1', $spl_use); ?>>사용함</option>
|
||||
<option value="0" <?php echo get_selected('0', $spl_use); ?>>사용안함</option>
|
||||
</select>
|
||||
@ -94,9 +125,15 @@ if($it['it_id']) {
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div><button type="button" id="sel_supply_delete">선택삭제</button></div>
|
||||
<div>
|
||||
<label for="spl_com_price">상품금액</label><input type="text" name="spl_com_price" value="0" id="spl_com_price" class="frm_input" size="5">
|
||||
</div>
|
||||
|
||||
<div class="btn_list">
|
||||
<button type="button" id="sel_supply_delete">선택삭제</button>
|
||||
</div>
|
||||
|
||||
<fieldset>
|
||||
<?php echo help('전체 추가 옵션의 상품금액, 재고/통보수량 및 사용여부를 일괄 적용할 수 있습니다.'); ?>
|
||||
<label for="spl_com_price">상품금액</label><input type="text" name="spl_com_price" value="0" id="spl_com_price" class="frm_input" size="9">
|
||||
<label for="spl_com_stock">재고수량</label><input type="text" name="spl_com_stock" value="0" id="spl_com_stock" class="frm_input" size="5">
|
||||
<label for="spl_com_noti">통보수량</label><input type="text" name="spl_com_noti" value="0" id="spl_com_noti" class="frm_input" size="5">
|
||||
<label for="spl_com_use">사용여부</label>
|
||||
@ -104,8 +141,8 @@ if($it['it_id']) {
|
||||
<option value="1">사용함</option>
|
||||
<option value="0">사용안함</option>
|
||||
</select>
|
||||
<button type="button" id="spl_value_apply">일괄적용</button>
|
||||
</div>
|
||||
<button type="button" id="spl_value_apply" class="btn_frmline">일괄적용</button>
|
||||
</fieldset>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
@ -168,14 +168,22 @@ strong.sodr_nonpay {display:block;padding:5px 0;text-align:right}
|
||||
.sit_relation_selwrap {display:block;height:30px}
|
||||
#add_span img, #sel_span img {margin:5px 0}
|
||||
|
||||
#sit_option {margin:0 0 10px;padding:10px 10px 0;border:1px solid #e9e9e9;background:#f7f7f7}
|
||||
#sit_option .frm_input {background:#fff !important;color:#000}
|
||||
#sit_option_frm #sit_option_frm_wrapper {margin:0 0 10px;height:auto !important;height:500px;max-height:500px;border:1px solid #484848;overflow-y:scroll}
|
||||
#sit_option_frm #sit_option_frm_wrapper th {padding:5px 0;text-align:center}
|
||||
.sit_option {margin:0 0 10px;padding:10px 10px 0;border:1px solid #e9e9e9;background:#f7f7f7}
|
||||
.sit_option .frm_input {background:#fff !important;color:#000}
|
||||
.sit_option_frm_wrapper {margin:0 0 10px;height:auto !important;height:500px;max-height:500px;border:1px solid #484848;overflow-y:scroll}
|
||||
.sit_option_frm_wrapper th {padding:5px 0 !important;text-align:center !important}
|
||||
|
||||
#sit_option_frm .btn_list {margin:0 0 10px}
|
||||
#sit_option_frm fieldset {padding:10px;border:1px solid #e9e9e9;background:#f7f7f7;text-align:center}
|
||||
#sit_option_frm fieldset .frm_input {margin:0 10px 0 5px;background:#fff !important;color:#000}
|
||||
|
||||
#sit_option_addfrm_btn {position:relative}
|
||||
#sit_option_addfrm_btn button {position:absolute;top:-38px;right:0}
|
||||
|
||||
#sit_option_addfrm .btn_list {margin:0 0 10px}
|
||||
#sit_option_addfrm fieldset {padding:10px;border:1px solid #e9e9e9;background:#f7f7f7;text-align:center}
|
||||
#sit_option_addfrm fieldset .frm_input {margin:0 10px 0 5px;background:#fff !important;color:#000}
|
||||
|
||||
/* 상품문의 */
|
||||
.sit_qa_subject {width:300px}
|
||||
.sit_qa_answer {width:30px;text-align:center}
|
||||
|
||||
Reference in New Issue
Block a user