쇼핑몰: #220 주문 쿠폰 기능 마크업 1차 완료

This commit is contained in:
whitedot
2013-06-12 16:58:49 +09:00
parent 3480057487
commit e40bf25779
4 changed files with 82 additions and 68 deletions

View File

@ -196,6 +196,8 @@ a.sanchor_on {background:#626870;color:#fff !important;text-decoration:none}
.btn01:focus, .btn01:hover {text-decoration:none !important} .btn01:focus, .btn01:hover {text-decoration:none !important}
.btn02 {display:inline-block;padding:0 10px;height:23px;border:1px solid #333 !important;background:#333 !important;color:#fff !important;text-decoration:none !important;line-height:2.15em;vertical-align:middle} .btn02 {display:inline-block;padding:0 10px;height:23px;border:1px solid #333 !important;background:#333 !important;color:#fff !important;text-decoration:none !important;line-height:2.15em;vertical-align:middle}
.btn02:focus, .btn02:hover {text-decoration:none !important} .btn02:focus, .btn02:hover {text-decoration:none !important}
button.btn01 {cursor:pointer}
button.btn02 {cursor:pointer}
.btn_confirm {text-align:center} /* 서식단계 진행 */ .btn_confirm {text-align:center} /* 서식단계 진행 */
.btn_submit {padding:0 10px;height:24px;border:0;background:#333;color:#fff;letter-spacing:-0.1em;vertical-align:top;cursor:pointer} .btn_submit {padding:0 10px;height:24px;border:0;background:#333;color:#fff;letter-spacing:-0.1em;vertical-align:top;cursor:pointer}
button.btn_submit {height:22px !important;font-size:1em} button.btn_submit {height:22px !important;font-size:1em}

View File

@ -21,45 +21,52 @@ $count = mysql_num_rows($result);
<div id="od_coupon_frm"> <div id="od_coupon_frm">
<?php if($count > 0) { ?> <?php if($count > 0) { ?>
<ul> <table class="basic_tbl">
<li> <caption>쿠폰 선택</caption>
<span>쿠폰명</span> <thead>
<span>할인금액</span> <tr>
<span>적용</span> <th scope="col">쿠폰명</th>
</li> <th scope="col">할인금액</th>
<?php <th scope="col">적용</th>
for($i=0; $row=sql_fetch_array($result); $i++) { </tr>
$dc = 0; </thead>
if($row['cp_type']) { <tbody>
$dc = floor(($amount * ($row['cp_amount'] / 100)) / $row['cp_trunc']) * $row['cp_trunc']; <?php
} else { for($i=0; $row=sql_fetch_array($result); $i++) {
$dc = $row['cp_amount']; $dc = 0;
} if($row['cp_type']) {
$dc = floor(($amount * ($row['cp_amount'] / 100)) / $row['cp_trunc']) * $row['cp_trunc'];
} else {
$dc = $row['cp_amount'];
}
if($row['cp_maximum'] && $dc > $row['cp_maximum']) if($row['cp_maximum'] && $dc > $row['cp_maximum'])
$dc = $row['cp_maximum']; $dc = $row['cp_maximum'];
?> ?>
<li> <tr>
<td>
<input type="hidden" name="o_cp_id[]" value="<?php echo $row['cp_id']; ?>"> <input type="hidden" name="o_cp_id[]" value="<?php echo $row['cp_id']; ?>">
<input type="hidden" name="o_cp_amt[]" value="<?php echo $dc; ?>"> <input type="hidden" name="o_cp_amt[]" value="<?php echo $dc; ?>">
<input type="hidden" name="o_cp_subj[]" value="<?php echo $row['cp_subject']; ?>"> <input type="hidden" name="o_cp_subj[]" value="<?php echo $row['cp_subject']; ?>">
<span><?php echo get_text($row['cp_subject']); ?></span> <?php echo get_text($row['cp_subject']); ?>
<span><?php echo number_format($dc); ?></span> </td>
<span><button type="button" class="od_cp_apply">적용</button></span> <td><?php echo number_format($dc); ?></td>
</li> <td><button type="button" class="od_cp_apply" class="btn_frmline">적용</button></td>
<?php </tr>
}
?>
</ul>
<?php <?php
} else {
echo '사용할 수 있는 쿠폰이 없습니다.';
} }
?> ?>
<div> </tbody>
<button type="button" id="od_coupon_close">닫기</button> </table>
<?php
} else {
echo '<p>사용할 수 있는 쿠폰이 없습니다.</p>';
}
?>
<div class="btn_confirm">
<button type="button" id="od_coupon_close" class="btn_submit">닫기</button>
<?php if($count > 0) { ?> <?php if($count > 0) { ?>
<button type="button" id="od_coupon_cancel">쿠폰적용취소</button> <button type="button" id="od_coupon_cancel" class="btn_cancel">쿠폰적용취소</button>
<?php } ?> <?php } ?>
</div> </div>
</div> </div>

View File

@ -44,8 +44,6 @@ $count = mysql_num_rows($result);
<?php if($count > 0) { ?> <?php if($count > 0) { ?>
<table class="basic_tbl"> <table class="basic_tbl">
<caption>쿠폰 선택</caption> <caption>쿠폰 선택</caption>
<colgroup>
</colgroup>
<thead> <thead>
<tr> <tr>
<th scope="col">쿠폰명</th> <th scope="col">쿠폰명</th>
@ -71,7 +69,7 @@ $count = mysql_num_rows($result);
<input type="hidden" name="f_cp_id[]" value="<?php echo $row['cp_id']; ?>"> <input type="hidden" name="f_cp_id[]" value="<?php echo $row['cp_id']; ?>">
<input type="hidden" name="f_cp_amt[]" value="<?php echo $dc; ?>"> <input type="hidden" name="f_cp_amt[]" value="<?php echo $dc; ?>">
<input type="hidden" name="f_cp_subj[]" value="<?php echo $row['cp_subject']; ?>"> <input type="hidden" name="f_cp_subj[]" value="<?php echo $row['cp_subject']; ?>">
<span><?php echo get_text($row['cp_subject']); ?></span> <?php echo get_text($row['cp_subject']); ?>
</td> </td>
<td class="td_bignum"><?php echo number_format($dc); ?></td> <td class="td_bignum"><?php echo number_format($dc); ?></td>
<td class="td_smallmng"><button type="button" class="cp_apply btn_frmline">적용</button></td> <td class="td_smallmng"><button type="button" class="cp_apply btn_frmline">적용</button></td>
@ -83,7 +81,7 @@ $count = mysql_num_rows($result);
</table> </table>
<?php <?php
} else { } else {
echo '사용할 수 있는 쿠폰이 없습니다.'; echo '<p>사용할 수 있는 쿠폰이 없습니다.</p>';
} }
?> ?>
<div class="btn_confirm"> <div class="btn_confirm">

View File

@ -22,48 +22,55 @@ $count = mysql_num_rows($result);
<div id="sc_coupon_frm"> <div id="sc_coupon_frm">
<?php if($count > 0) { ?> <?php if($count > 0) { ?>
<ul> <table class="basic_tbl">
<li> <caption>쿠폰 선택</caption>
<span>쿠폰명</span> <thead>
<span>할인금액</span> <tr>
<span>적용</span> <th scope="col">쿠폰명</th>
</li> <th>할인금액</th>
<?php <th>적용</th>
for($i=0; $row=sql_fetch_array($result); $i++) { </tr>
$dc = 0; </thead>
if($row['cp_type']) { <tbody>
$dc = floor(($send_cost * ($row['cp_amount'] / 100)) / $row['cp_trunc']) * $row['cp_trunc']; <?php
} else { for($i=0; $row=sql_fetch_array($result); $i++) {
$dc = $row['cp_amount']; $dc = 0;
} if($row['cp_type']) {
$dc = floor(($send_cost * ($row['cp_amount'] / 100)) / $row['cp_trunc']) * $row['cp_trunc'];
} else {
$dc = $row['cp_amount'];
}
if($row['cp_maximum'] && $dc > $row['cp_maximum']) if($row['cp_maximum'] && $dc > $row['cp_maximum'])
$dc = $row['cp_maximum']; $dc = $row['cp_maximum'];
if($dc > $send_cost) if($dc > $send_cost)
$dc = $send_cost; $dc = $send_cost;
?> ?>
<li> <tr>
<td>
<input type="hidden" name="s_cp_id[]" value="<?php echo $row['cp_id']; ?>"> <input type="hidden" name="s_cp_id[]" value="<?php echo $row['cp_id']; ?>">
<input type="hidden" name="s_cp_amt[]" value="<?php echo $dc; ?>"> <input type="hidden" name="s_cp_amt[]" value="<?php echo $dc; ?>">
<input type="hidden" name="s_cp_subj[]" value="<?php echo $row['cp_subject']; ?>"> <input type="hidden" name="s_cp_subj[]" value="<?php echo $row['cp_subject']; ?>">
<span><?php echo get_text($row['cp_subject']); ?></span> <?php echo get_text($row['cp_subject']); ?>
<span><?php echo number_format($dc); ?></span> </td>
<span><button type="button" class="sc_cp_apply">적용</button></span> <td><?php echo number_format($dc); ?></td>
</li> <td><button type="button" class="sc_cp_apply">적용</button></td>
<?php </tr>
}
?>
</ul>
<?php <?php
} else {
echo '사용할 수 있는 쿠폰이 없습니다.';
} }
?> ?>
<div> </tbody>
<button type="button" id="sc_coupon_close">닫기</button> </table>
<?php
} else {
echo '<p>사용할 수 있는 쿠폰이 없습니다.</p>';
}
?>
<div class="btn_confirm">
<button type="button" id="sc_coupon_close" class="btn_submit">닫기</button>
<?php if($count > 0) { ?> <?php if($count > 0) { ?>
<button type="button" id="sc_coupon_cancel">쿠폰적용취소</button> <button type="button" id="sc_coupon_cancel" class="btn_cancel">쿠폰적용취소</button>
<?php } ?> <?php } ?>
</div> </div>
</div> </div>