#340 품절 상품 구매버튼 보이지 않도록 수정
This commit is contained in:
@ -106,12 +106,6 @@ if ($row['it_id']) {
|
||||
$next_href2 = '';
|
||||
}
|
||||
|
||||
// 선택 옵션
|
||||
$option_1 = get_item_options($it['it_id'], $it['it_option_subject']);
|
||||
|
||||
// 추가 옵션
|
||||
$option_2 = get_item_supply($it['it_id'], $it['it_supply_subject']);
|
||||
|
||||
// 관리자가 확인한 사용후기의 개수를 얻음
|
||||
$sql = " select count(*) as cnt from `{$g5['g5_shop_item_use_table']}` where it_id = '{$it_id}' and is_confirm = '1' ";
|
||||
$row = sql_fetch($sql);
|
||||
@ -130,6 +124,32 @@ $sql = " select count(*) as cnt
|
||||
$row = sql_fetch($sql);
|
||||
$item_relation_count = $row['cnt'];
|
||||
|
||||
// 상품품절체크
|
||||
$is_soldout = is_soldout($it['it_id']);
|
||||
|
||||
// 주문가능체크
|
||||
$is_orderable = true;
|
||||
if(!$it['it_use'] || $it['it_tel_inq'] || $is_soldout)
|
||||
$is_orderable = false;
|
||||
|
||||
if($is_orderable) {
|
||||
// 선택 옵션
|
||||
$option_1 = get_item_options($it['it_id'], $it['it_option_subject']);
|
||||
|
||||
// 추가 옵션
|
||||
$option_2 = get_item_supply($it['it_id'], $it['it_supply_subject']);
|
||||
|
||||
// 상품 선택옵션 수
|
||||
$sql = " select count(*) as cnt from {$g5['g5_shop_item_option_table']} where it_id = '{$it['it_id']}' and io_type = '0' and io_use = '1' ";
|
||||
$row = sql_fetch($sql);
|
||||
$opt_count = $row['cnt'];
|
||||
|
||||
// 상품 추가옵션 수
|
||||
$sql = " select count(*) as cnt from {$g5['g5_shop_item_option_table']} where it_id = '{$it['it_id']}' and io_type = '1' and io_use = '1' ";
|
||||
$row = sql_fetch($sql);
|
||||
$spl_count = $row['cnt'];
|
||||
}
|
||||
|
||||
$g5['title'] = $it['it_name'].' > '.$it['ca_name'];
|
||||
|
||||
include_once(G5_MSHOP_PATH.'/_head.php');
|
||||
@ -143,7 +163,9 @@ include G5_MSHOP_SKIN_PATH.'/navigation.skin.php';
|
||||
echo '<div id="sit_hhtml">'.stripslashes($it['it_mobile_head_html']).'</div>';
|
||||
?>
|
||||
|
||||
<?php if($is_orderable) { ?>
|
||||
<script src="<?php echo G5_JS_URL; ?>/shop.js"></script>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
if (G5_HTTPS_DOMAIN)
|
||||
|
||||
@ -85,23 +85,22 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
<td><?php echo $it['it_brand']; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($it['it_model']) { ?>
|
||||
<tr>
|
||||
<th scope="row">모델</th>
|
||||
<td><?php echo $it['it_model']; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($it['it_tel_inq']) { // 전화문의일 경우 ?>
|
||||
|
||||
<?php if (!$it['it_use']) { // 판매가능이 아닐 경우 ?>
|
||||
<tr>
|
||||
<th scope="row">판매가격</th>
|
||||
<td>판매중지</td>
|
||||
</tr>
|
||||
<?php } else if ($it['it_tel_inq']) { // 전화문의일 경우 ?>
|
||||
<tr>
|
||||
<th scope="row">판매가격</th>
|
||||
<td>전화문의</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<?php } else { // 전화문의가 아닐 경우?>
|
||||
<?php if ($it['it_cust_price']) { // 1.00.03?>
|
||||
<tr>
|
||||
@ -117,6 +116,7 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
<input type="hidden" id="it_price" value="<?php echo get_price($it); ?>">
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
/* 재고 표시하는 경우 주석 해제
|
||||
@ -223,9 +223,7 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
}
|
||||
?>
|
||||
|
||||
<?php } // 전화문의가 아닐 경우 끝?>
|
||||
|
||||
<?php if ($it['it_use'] && !$it['it_tel_inq']) { ?>
|
||||
<?php if ($it['it_use'] && !$it['it_tel_inq'] && !$is_soldout) { ?>
|
||||
<div id="sit_sel_option">
|
||||
<?php
|
||||
if(!$option_1) {
|
||||
@ -259,8 +257,12 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
<div id="sit_tot_price"></div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($is_soldout) { ?>
|
||||
<p>상품의 재고가 부족하여 구매할 수 없습니다.</p>
|
||||
<?php } ?>
|
||||
|
||||
<ul id="sit_ov_btn">
|
||||
<?php if (!$it['it_tel_inq']) { ?>
|
||||
<?php if ($is_orderable) { ?>
|
||||
<li><input type="submit" onclick="document.pressed=this.value;" value="바로구매" id="sit_btn_buy"></li>
|
||||
<li><input type="submit" onclick="document.pressed=this.value;" value="장바구니" id="sit_btn_cart"></li>
|
||||
<?php } ?>
|
||||
|
||||
Reference in New Issue
Block a user