영카트 5.4 버전 내용 적용
This commit is contained in:
@ -8,8 +8,7 @@ if($is_guest)
|
||||
$pattern = '#[/\'\"%=*\#\(\)\|\+\&\!\$~\{\}\[\]`;:\?\^\,]#';
|
||||
$it_id = preg_replace($pattern, '', $_POST['it_id']);
|
||||
$sw_direct = $_POST['sw_direct'];
|
||||
$sql = " select it_id, ca_id, ca_id2, ca_id3 from {$g5['g5_shop_item_table']} where it_id = '$it_id' ";
|
||||
$it = sql_fetch($sql);
|
||||
$it = get_shop_item($it_id, true);
|
||||
|
||||
// 상품 총 금액
|
||||
if($sw_direct)
|
||||
@ -41,59 +40,62 @@ $count = sql_num_rows($result);
|
||||
?>
|
||||
|
||||
<!-- 쿠폰 선택 시작 { -->
|
||||
<div id="cp_frm" class="od_coupon">
|
||||
<div class="od_coupon_wrap">
|
||||
<div id="cp_frm" class="od_coupon">
|
||||
<h3>쿠폰선택</h3>
|
||||
<?php if($count > 0) { ?>
|
||||
<div class="tbl_head02 tbl_wrap">
|
||||
<table>
|
||||
<caption>쿠폰 선택</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">쿠폰명</th>
|
||||
<th scope="col">할인금액</th>
|
||||
<th scope="col">적용</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
// 사용한 쿠폰인지 체크
|
||||
if(is_used_coupon($member['mb_id'], $row['cp_id']))
|
||||
continue;
|
||||
|
||||
$dc = 0;
|
||||
if($row['cp_type']) {
|
||||
$dc = floor(($item_price * ($row['cp_price'] / 100)) / $row['cp_trunc']) * $row['cp_trunc'];
|
||||
} else {
|
||||
$dc = $row['cp_price'];
|
||||
}
|
||||
|
||||
if($row['cp_maximum'] && $dc > $row['cp_maximum'])
|
||||
$dc = $row['cp_maximum'];
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="hidden" name="f_cp_id[]" value="<?php echo $row['cp_id']; ?>">
|
||||
<input type="hidden" name="f_cp_prc[]" value="<?php echo $dc; ?>">
|
||||
<input type="hidden" name="f_cp_subj[]" value="<?php echo $row['cp_subject']; ?>">
|
||||
<?php echo get_text($row['cp_subject']); ?>
|
||||
</td>
|
||||
<td class="td_numbig"><?php echo number_format($dc); ?></td>
|
||||
<td class="td_mngsmall"><button type="button" class="cp_apply">적용</button></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
} else {
|
||||
echo '<div class="empty_list">사용할 수 있는 쿠폰이 없습니다.</div>';
|
||||
}
|
||||
?>
|
||||
<div class="btn_confirm">
|
||||
<button type="button" id="cp_close" class="btn_close"><i class="fa fa-times" aria-hidden="true"></i><span class="sound_only">닫기</span></button>
|
||||
|
||||
<?php if($count > 0) { ?>
|
||||
<div class="tbl_head02 tbl_wrap">
|
||||
<table>
|
||||
<caption>쿠폰 선택</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">쿠폰명</th>
|
||||
<th scope="col">할인금액</th>
|
||||
<th scope="col">적용</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
// 사용한 쿠폰인지 체크
|
||||
if(is_used_coupon($member['mb_id'], $row['cp_id']))
|
||||
continue;
|
||||
|
||||
$dc = 0;
|
||||
if($row['cp_type']) {
|
||||
$dc = floor(($item_price * ($row['cp_price'] / 100)) / $row['cp_trunc']) * $row['cp_trunc'];
|
||||
} else {
|
||||
$dc = $row['cp_price'];
|
||||
}
|
||||
|
||||
if($row['cp_maximum'] && $dc > $row['cp_maximum'])
|
||||
$dc = $row['cp_maximum'];
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="hidden" name="f_cp_id[]" value="<?php echo $row['cp_id']; ?>">
|
||||
<input type="hidden" name="f_cp_prc[]" value="<?php echo $dc; ?>">
|
||||
<input type="hidden" name="f_cp_subj[]" value="<?php echo $row['cp_subject']; ?>">
|
||||
<?php echo get_text($row['cp_subject']); ?>
|
||||
</td>
|
||||
<td class="td_numbig"><?php echo number_format($dc); ?></td>
|
||||
<td class="td_mngsmall"><button type="button" class="cp_apply">적용</button></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
} else {
|
||||
echo '<div class="empty_list">사용할 수 있는 쿠폰이 없습니다.</div>';
|
||||
}
|
||||
?>
|
||||
<div class="btn_confirm">
|
||||
<button type="button" id="cp_close" class="btn_close"><i class="fa fa-times" aria-hidden="true"></i><span class="sound_only">닫기</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- } 쿠폰 선택 끝 -->
|
||||
Reference in New Issue
Block a user