상품정보에 상품품절 설정 추가
This commit is contained in:
@ -481,6 +481,19 @@ $(function(){
|
||||
<label for="chk_all_it_point">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="it_soldout">상품품절</label></th>
|
||||
<td>
|
||||
<?php echo help("잠시 판매를 중단하거나 재고가 없을 경우에 체크해 놓으면 품절상품으로 표시됩니다."); ?>
|
||||
<input type="checkbox" name="it_soldout" value="1" id="it_soldout" <?php echo ($it['it_soldout']) ? "checked" : ""; ?>> 예
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_ca_it_soldout" value="1" id="chk_ca_it_soldout">
|
||||
<label for="chk_ca_it_soldout">분류적용</label>
|
||||
<input type="checkbox" name="chk_all_it_soldout" value="1" id="chk_all_it_soldout">
|
||||
<label for="chk_all_it_soldout">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="it_stock_qty">재고수량</label></th>
|
||||
<td>
|
||||
|
||||
@ -287,6 +287,7 @@ $sql_common = " ca_id = '$ca_id',
|
||||
it_notax = '$it_notax',
|
||||
it_sell_email = '$it_sell_email',
|
||||
it_use = '$it_use',
|
||||
it_soldout = '$it_soldout',
|
||||
it_stock_qty = '$it_stock_qty',
|
||||
it_noti_qty = '$it_noti_qty',
|
||||
it_sc_type = '$it_sc_type',
|
||||
@ -459,6 +460,7 @@ if(is_checked('chk_ca_it_notax')) $ca_fields .= " , it_notax = '$i
|
||||
if(is_checked('chk_ca_it_sell_email')) $ca_fields .= " , it_sell_email = '$it_sell_email' ";
|
||||
if(is_checked('chk_ca_it_tel_inq')) $ca_fields .= " , it_tel_inq = '$it_tel_inq' ";
|
||||
if(is_checked('chk_ca_it_use')) $ca_fields .= " , it_use = '$it_use' ";
|
||||
if(is_checked('chk_ca_it_soldout')) $ca_fields .= " , it_soldout = '$it_soldout' ";
|
||||
if(is_checked('chk_ca_it_info')) $ca_fields .= " , it_info_gubun = '$it_info_gubun', it_info_value = '$it_info_value' ";
|
||||
if(is_checked('chk_ca_it_price')) $ca_fields .= " , it_price = '$it_price' ";
|
||||
if(is_checked('chk_ca_it_cust_price')) $ca_fields .= " , it_cust_price = '$it_cust_price' ";
|
||||
@ -504,6 +506,7 @@ if(is_checked('chk_all_it_notax')) $all_fields .= " , it_notax = '
|
||||
if(is_checked('chk_all_it_sell_email')) $all_fields .= " , it_sell_email = '$it_sell_email' ";
|
||||
if(is_checked('chk_all_it_tel_inq')) $all_fields .= " , it_tel_inq = '$it_tel_inq' ";
|
||||
if(is_checked('chk_all_it_use')) $all_fields .= " , it_use = '$it_use' ";
|
||||
if(is_checked('chk_all_it_soldout')) $all_fields .= " , it_soldout = '$it_soldout' ";
|
||||
if(is_checked('chk_all_it_info')) $all_fields .= " , it_info_gubun = '$it_info_gubun', it_info_value = '$it_info_value' ";
|
||||
if(is_checked('chk_all_it_price')) $all_fields .= " , it_price = '$it_price' ";
|
||||
if(is_checked('chk_all_it_cust_price')) $all_fields .= " , it_cust_price = '$it_cust_price' ";
|
||||
|
||||
@ -144,6 +144,7 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</
|
||||
<th scope="col" colspan="4">분류</th>
|
||||
<th scope="col" rowspan="3"><?php echo subject_sort_link('it_order', 'sca='.$sca); ?>순서</a></th>
|
||||
<th scope="col" rowspan="3"><?php echo subject_sort_link('it_use', 'sca='.$sca, 1); ?>판매</a></th>
|
||||
<th scope="col" rowspan="3"><?php echo subject_sort_link('it_soldout', 'sca='.$sca, 1); ?>품절</a></th>
|
||||
<th scope="col" rowspan="3"><?php echo subject_sort_link('it_hit', 'sca='.$sca, 1); ?>조회</a></th>
|
||||
<th scope="col" rowspan="3">관리</th>
|
||||
</tr>
|
||||
@ -184,6 +185,7 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</
|
||||
</td>
|
||||
<td rowspan="3" class="td_mngsmall"><input type="text" name="it_order[<?php echo $i; ?>]" value="<?php echo $row['it_order']; ?>" class="frm_input" size="3"></td>
|
||||
<td rowspan="3" class="td_chk"><input type="checkbox" name="it_use[<?php echo $i; ?>]" <?php echo ($row['it_use'] ? 'checked' : ''); ?> value="1"></td>
|
||||
<td rowspan="3" class="td_chk"><input type="checkbox" name="it_soldout[<?php echo $i; ?>]" <?php echo ($row['it_soldout'] ? 'checked' : ''); ?> value="1"></td>
|
||||
<td rowspan="3" class="td_num"><?php echo $row['it_hit']; ?></td>
|
||||
<td rowspan="3" class="td_mng">
|
||||
<a href="<?php echo $href; ?>"><span class="sound_only"><?php echo htmlspecialchars2(cut_str($row['it_name'],250, "")); ?> </span>보기</a>
|
||||
|
||||
@ -25,6 +25,7 @@ if ($_POST['act_button'] == "선택수정") {
|
||||
it_price = '{$_POST['it_price'][$k]}',
|
||||
it_stock_qty = '{$_POST['it_stock_qty'][$k]}',
|
||||
it_use = '{$_POST['it_use'][$k]}',
|
||||
it_soldout = '{$_POST['it_soldout'][$k]}',
|
||||
it_order = '{$_POST['it_order'][$k]}',
|
||||
it_update_time = '".G5_TIME_YMDHIS."'
|
||||
where it_id = '{$_POST['it_id'][$k]}' ";
|
||||
|
||||
@ -731,4 +731,10 @@ if(!sql_query(" select iq_hp from {$g5['g5_shop_item_qa_table']} limit 1 ", fals
|
||||
ADD `iq_hp` varchar(255) NOT NULL DEFAULT '' AFTER `iq_email` ", true);
|
||||
}
|
||||
*/
|
||||
|
||||
// 상품품절 필드추가
|
||||
if(!sql_query(" select it_soldout from {$g5['g5_shop_item_table']} limit 1 ", false)) {
|
||||
sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}`
|
||||
ADD `it_soldout` tinyint(4) NOT NULL DEFAULT '0' AFTER `it_use` ", true);
|
||||
}
|
||||
?>
|
||||
|
||||
@ -427,6 +427,7 @@ CREATE TABLE IF NOT EXISTS `g5_shop_item` (
|
||||
`it_notax` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`it_sell_email` varchar(255) NOT NULL DEFAULT '',
|
||||
`it_use` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`it_soldout` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`it_stock_qty` int(11) NOT NULL DEFAULT '0',
|
||||
`it_noti_qty` int(11) NOT NULL DEFAULT '0',
|
||||
`it_sc_type` tinyint(4) NOT NULL DEFAULT '0',
|
||||
|
||||
@ -1831,10 +1831,10 @@ function is_soldout($it_id)
|
||||
global $g5;
|
||||
|
||||
// 상품정보
|
||||
$sql = " select it_stock_qty from {$g5['g5_shop_item_table']} where it_id = '$it_id' ";
|
||||
$sql = " select it_soldout, it_stock_qty from {$g5['g5_shop_item_table']} where it_id = '$it_id' ";
|
||||
$it = sql_fetch($sql);
|
||||
|
||||
if($it['it_stock_qty'] <= 0)
|
||||
if($it['it_soldout'] || $it['it_stock_qty'] <= 0)
|
||||
return true;
|
||||
|
||||
$count = 0;
|
||||
|
||||
Reference in New Issue
Block a user