분류 및 상품관리에 쿠폰적용안함 설정 추가
This commit is contained in:
@ -91,6 +91,12 @@ $frm_submit = '<div class="btn_confirm01 btn_confirm">
|
||||
<input type="submit" value="확인" class="btn_submit" accesskey="s">
|
||||
<a href="./categorylist.php?'.$qstr.'">목록</a>
|
||||
</div>';
|
||||
|
||||
// 쿠폰 적용 불가 설정 필드 추가
|
||||
if(!sql_query(" select ca_nocoupon from {$g5['g5_shop_category_table']} limit 1 ", false)) {
|
||||
sql_query(" ALTER TABLE `{$g5['g5_shop_category_table']}`
|
||||
ADD `ca_nocoupon` tinyint(4) NOT NULL DEFAULT '0' AFTER `ca_adult_use` ", true);
|
||||
}
|
||||
?>
|
||||
|
||||
<form name="fcategoryform" action="./categoryformupdate.php" onsubmit="return fcategoryformcheck(this);" method="post" enctype="multipart/form-data">
|
||||
@ -252,6 +258,14 @@ $frm_submit = '<div class="btn_confirm01 btn_confirm">
|
||||
예
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="ca_nocoupon">쿠폰적용안함</label></th>
|
||||
<td>
|
||||
<?php echo help("설정에 체크하시면 쿠폰생성 때 분류 검색 결과에 노출되지 않습니다."); ?>
|
||||
<input type="checkbox" name="ca_nocoupon" <?php echo ($ca['ca_nocoupon']) ? "checked" : ""; ?> value="1" id="ca_nocoupon">
|
||||
예
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@ -62,6 +62,7 @@ $sql_common = " ca_skin = '$ca_skin',
|
||||
ca_mb_id = '$ca_mb_id',
|
||||
ca_cert_use = '$ca_cert_use',
|
||||
ca_adult_use = '$ca_adult_use',
|
||||
ca_nocoupon = '$ca_nocoupon',
|
||||
ca_1_subj = '$ca_1_subj',
|
||||
ca_2_subj = '$ca_2_subj',
|
||||
ca_3_subj = '$ca_3_subj',
|
||||
|
||||
@ -38,15 +38,15 @@ if($_POST['cp_type'] && ($_POST['cp_price'] < 1 || $_POST['cp_price'] > 99))
|
||||
alert('할인비율을은 1과 99사이 값으로 입력해 주십시오.');
|
||||
|
||||
if($_POST['cp_method'] == 0) {
|
||||
$sql = " select count(*) as cnt from {$g5['g5_shop_item_table']} where it_id = '$cp_target' ";
|
||||
$sql = " select count(*) as cnt from {$g5['g5_shop_item_table']} where it_id = '$cp_target' and it_nocoupon = '0' ";
|
||||
$row = sql_fetch($sql);
|
||||
if(!$row['cnt'])
|
||||
alert('입력하신 상품코드는 존재하지 않는 상품코드입니다.');
|
||||
alert('입력하신 상품코드는 존재하지 않는 코드이거나 쿠폰적용안함으로 설정된 상품입니다.');
|
||||
} else if($_POST['cp_method'] == 1) {
|
||||
$sql = " select count(*) as cnt from {$g5['g5_shop_category_table']} where ca_id = '$cp_target' ";
|
||||
$sql = " select count(*) as cnt from {$g5['g5_shop_category_table']} where ca_id = '$cp_target' and ca_nocoupon = '0' ";
|
||||
$row = sql_fetch($sql);
|
||||
if(!$row['cnt'])
|
||||
alert('입력하신 분류코드는 존재하지 않는 분류코드입니다.');
|
||||
alert('입력하신 분류코드는 존재하지 않는 분류코드이거나 쿠폰적용안함으로 설정된 분류입니다.');
|
||||
}
|
||||
|
||||
if($w == '') {
|
||||
|
||||
@ -23,14 +23,14 @@ include_once(G5_PATH.'/head.sub.php');
|
||||
|
||||
if($_GET['sch_target'] == 1) {
|
||||
$sql_common = " from {$g5['g5_shop_category_table']} ";
|
||||
$sql_where = " where ca_use = '1' ";
|
||||
$sql_where = " where ca_use = '1' and ca_nocoupon = '0' ";
|
||||
if($_GET['sch_word'])
|
||||
$sql_where .= " and ca_name like '%$sch_word%' ";
|
||||
$sql_select = " select ca_id as t_id, ca_name as t_name ";
|
||||
$sql_order = " order by ca_name ";
|
||||
} else {
|
||||
$sql_common = " from {$g5['g5_shop_item_table']} ";
|
||||
$sql_where = " where it_use = '1' ";
|
||||
$sql_where = " where it_use = '1' and it_nocoupon = '0' ";
|
||||
if($_GET['sch_word'])
|
||||
$sql_where .= " and it_name like '%$sch_word%' ";
|
||||
$sql_select = " select it_id as t_id, it_name as t_name ";
|
||||
|
||||
@ -114,6 +114,12 @@ $frm_submit = '<div class="btn_confirm01 btn_confirm">
|
||||
if($it_id)
|
||||
$frm_submit .= PHP_EOL.'<a href="'.G5_SHOP_URL.'/item.php?it_id='.$it_id.'" class="btn_frmline">상품보기</a>';
|
||||
$frm_submit .= '</div>';
|
||||
|
||||
// 쿠폰적용안함 설정 필드 추가
|
||||
if(!sql_query(" select it_nocoupon from {$g5['g5_shop_item_table']} limit 1", false)) {
|
||||
sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}`
|
||||
ADD `it_nocoupon` tinyint(4) NOT NULL DEFAULT '0' AFTER `it_use` ", true);
|
||||
}
|
||||
?>
|
||||
|
||||
<form name="fitemform" action="./itemformupdate.php" method="post" enctype="MULTIPART/FORM-DATA" autocomplete="off" onsubmit="return fitemformcheck(this)">
|
||||
@ -354,6 +360,19 @@ $frm_submit .= '</div>';
|
||||
<label for="chk_all_it_use">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="it_nocoupon">쿠폰적용안함</label></th>
|
||||
<td>
|
||||
<?php echo help("설정에 체크하시면 쿠폰 생성 때 상품 검색 결과에 노출되지 않습니다."); ?>
|
||||
<input type="checkbox" name="it_nocoupon" value="1" id="it_nocoupon" <?php echo ($it['it_nocoupon']) ? "checked" : ""; ?>> 예
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_ca_it_nocoupon" value="1" id="chk_ca_it_nocoupon">
|
||||
<label for="chk_ca_it_nocoupon">분류적용</label>
|
||||
<input type="checkbox" name="chk_all_it_nocoupon" value="1" id="chk_all_it_nocoupon">
|
||||
<label for="chk_all_it_nocoupon">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">상품설명</th>
|
||||
<td colspan="2"> <?php echo editor_html('it_explan', $it['it_explan']); ?></td>
|
||||
|
||||
@ -290,6 +290,7 @@ $sql_common = " ca_id = '$ca_id',
|
||||
it_notax = '$it_notax',
|
||||
it_sell_email = '$it_sell_email',
|
||||
it_use = '$it_use',
|
||||
it_nocoupon = '$it_nocoupon',
|
||||
it_soldout = '$it_soldout',
|
||||
it_stock_qty = '$it_stock_qty',
|
||||
it_stock_sms = '$it_stock_sms',
|
||||
@ -464,6 +465,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_nocoupon')) $ca_fields .= " , it_nocoupon = '$it_nocoupon' ";
|
||||
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' ";
|
||||
@ -510,6 +512,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_nocoupon')) $all_fields .= " , it_nocoupon = '$it_nocoupon' ";
|
||||
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' ";
|
||||
|
||||
@ -87,6 +87,7 @@ CREATE TABLE IF NOT EXISTS `g5_shop_category` (
|
||||
`ca_mb_id` varchar(255) NOT NULL DEFAULT '',
|
||||
`ca_cert_use` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`ca_adult_use` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`ca_nocoupon` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`ca_1_subj` varchar(255) NOT NULL DEFAULT '',
|
||||
`ca_2_subj` varchar(255) NOT NULL DEFAULT '',
|
||||
`ca_3_subj` varchar(255) NOT NULL DEFAULT '',
|
||||
@ -383,6 +384,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_nocoupon` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`it_soldout` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`it_stock_qty` int(11) NOT NULL DEFAULT '0',
|
||||
`it_stock_sms` tinyint(4) NOT NULL DEFAULT '0',
|
||||
|
||||
Reference in New Issue
Block a user