사용자 모바일 상품 리스트 레이아웃 변경 중

This commit is contained in:
chicpro
2013-11-11 17:56:34 +09:00
parent c1f1a0b6b6
commit e2227b2f65
3 changed files with 80 additions and 78 deletions

View File

@ -14,13 +14,15 @@ include_once(G5_MSHOP_PATH.'/_head.php');
<table> <table>
<thead> <thead>
<tr> <tr>
<th scope="col">상품이미지</th> <th scope="col" rowspan="2">상품이미지</th>
<th scope="col">상품명</th> <th scope="col" colspan="4">상품명</th>
<th scope="col" rowspan="2"><input type="checkbox" name="ct_all" value="1" checked="checked"></th>
</tr>
<tr>
<th scope="col">총수량</th> <th scope="col">총수량</th>
<th scope="col">판매가</th> <th scope="col">판매가</th>
<th scope="col">소계</th> <th scope="col">소계</th>
<th scope="col">포인트</th> <th scope="col">포인트</th>
<th scope="col"><input type="checkbox" name="ct_all" value="1" checked="checked"></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -72,7 +74,7 @@ include_once(G5_MSHOP_PATH.'/_head.php');
$it_name = $a1 . stripslashes($row['it_name']) . $a2; $it_name = $a1 . stripslashes($row['it_name']) . $a2;
$it_options = print_item_options($row['it_id'], $s_cart_id); $it_options = print_item_options($row['it_id'], $s_cart_id);
if($it_options) { if($it_options) {
$mod_options = '<div class="sod_option_btn"><button type="button" class="mod_options">선택사항수정</button></div>'; $mod_options = '<div class="sod_option_btn"><button type="button" id="mod_opt_'.$row['it_id'].'" class="mod_options">선택사항수정</button></div>';
$it_name .= '<div class="sod_bsk_itopt">'.$it_options.'</div>'; $it_name .= '<div class="sod_bsk_itopt">'.$it_options.'</div>';
} }
@ -81,18 +83,22 @@ include_once(G5_MSHOP_PATH.'/_head.php');
?> ?>
<tr> <tr>
<td class="sod_bsk_img"><?php echo $image; ?></td> <td rowspan="3" class="sod_bsk_img"><?php echo $image; ?></td>
<td> <td colspan="4">
<input type="hidden" name="it_id[<?php echo $i; ?>]" value="<?php echo $row['it_id']; ?>"> <input type="hidden" name="it_id[<?php echo $i; ?>]" value="<?php echo $row['it_id']; ?>">
<input type="hidden" name="it_name[<?php echo $i; ?>]" value="<?php echo get_text($row['it_name']); ?>"> <input type="hidden" name="it_name[<?php echo $i; ?>]" value="<?php echo get_text($row['it_name']); ?>">
<?php echo $it_name.$mod_options; ?> <?php echo $it_name; ?>
</td> </td>
<td rowspan="3" class="td_mngsmall"><input type="checkbox" name="ct_chk[<?php echo $i; ?>]" value="1" checked="checked"></td>
</tr>
<tr>
<td class="td_num"><?php echo number_format($sum['qty']); ?></td> <td class="td_num"><?php echo number_format($sum['qty']); ?></td>
<td class="td_numbig"><?php echo number_format($row['ct_price']); ?></td> <td class="td_numbig"><?php echo number_format($row['ct_price']); ?></td>
<td class="td_numbig"><?php echo number_format($sell_price); ?></td> <td class="td_numbig"><?php echo number_format($sell_price); ?></td>
<td class="td_num"><?php echo number_format($sum['point']); ?></td> <td class="td_num"><?php echo number_format($sum['point']); ?></td>
<td class="td_mngsmall"><input type="checkbox" name="ct_chk[<?php echo $i; ?>]" value="1" checked="checked"></td> </tr>
<tr>
<td colspan="4"><?php echo $mod_options; ?></td>
</tr> </tr>
<?php <?php
@ -153,7 +159,7 @@ $(function() {
// 선택사항수정 // 선택사항수정
$(".mod_options").click(function() { $(".mod_options").click(function() {
var it_id = $(this).closest("tr").find("input[name^=it_id]").val(); var it_id = $(this).attr("id").replace("mod_opt_", "");
var $this = $(this); var $this = $(this);
close_btn_idx = $(".mod_options").index($(this)); close_btn_idx = $(".mod_options").index($(this));

View File

@ -189,7 +189,7 @@ ob_start();
<?php if($default['de_tax_flag_use']) { ?> <?php if($default['de_tax_flag_use']) { ?>
<input type="hidden" name="it_notax[<?php echo $i; ?>]" value="<?php echo $row['it_notax']; ?>"> <input type="hidden" name="it_notax[<?php echo $i; ?>]" value="<?php echo $row['it_notax']; ?>">
<?php } ?> <?php } ?>
<?php echo $it_name.$mod_options; ?> <?php echo $it_name; ?>
</td> </td>
</tr> </tr>
<tr> <tr>

View File

@ -41,78 +41,74 @@ include_once(G5_MSHOP_PATH.'/_head.php');
order by ct_id "; order by ct_id ";
$result = sql_query($sql); $result = sql_query($sql);
?> ?>
<ul id="sod_ul"> <table>
<?php <thead>
for($i=0; $row=sql_fetch_array($result); $i++) { <tr>
$image = get_it_image($row['it_id'], 70, 70); <th scope="col" rowspan="3">상품이미지</th>
?> <th scope="col" colspan="5">상품명</th>
<li> </tr>
<p> <th scope="col" colspan="5">옵션항목</th>
<a href="./item.php?it_id=<?php echo $row['it_id']; ?>"><?php echo $image; ?> <?php echo $row['it_name']; ?></a> <tr>
</p> <th scope="col">수량</th>
<th scope="col">판매가</th>
<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++) {
$image = get_it_image($row['it_id'], 70, 70);
<div class="tbl_head01 tbl_wrap"> // 옵션항목
<table> $sql = " select ct_id, it_name, ct_option, ct_qty, ct_price, ct_point, ct_status, io_type, io_price
<thead> from {$g5['g5_shop_cart_table']}
<tr> where od_id = '$od_id'
<th scope="col">옵션항목</th> and it_id = '{$row['it_id']}'
<th scope="col">수량</th> order by io_type asc, ct_id asc ";
<th scope="col">판매가</th> $res = sql_query($sql);
<th scope="col">소계</th> $rowspan = mysql_num_rows($res) * 2 + 1;
<th scope="col">포인트</th> ?>
<th scope="col">상태</th> <tr>
</tr> <td rowspan="<?php echo $rowspan; ?>"><a href="./item.php?it_id=<?php echo $row['it_id']; ?>"><?php echo $image; ?></a></td>
</thead> <td colspan="5"><a href="./item.php?it_id=<?php echo $row['it_id']; ?>"><?php echo $row['it_name']; ?></a></td>
<tbody> </tr>
<?php <?php
$sql = " select ct_id, it_name, ct_option, ct_qty, ct_price, ct_point, ct_status, io_type, io_price for($k=0; $opt=sql_fetch_array($res); $k++) {
from {$g5['g5_shop_cart_table']} if($opt['io_type'])
where od_id = '$od_id' $opt_price = $opt['io_price'];
and it_id = '{$row['it_id']}' else
order by io_type asc, ct_id asc "; $opt_price = $opt['ct_price'] + $opt['io_price'];
$res = sql_query($sql);
$ct_list = array();
for($k=0; $opt=sql_fetch_array($res); $k++) { $sell_price = $opt_price * $opt['ct_qty'];
if($opt['io_type']) $point = $opt['ct_point'] * $opt['ct_qty'];
$opt_price = $opt['io_price']; ?>
else <tr>
$opt_price = $opt['ct_price'] + $opt['io_price']; <td colspan="5"><?php echo $opt['ct_option']; ?></td>
</tr>
<tr>
<td class="td_mngsmall"><?php echo number_format($opt['ct_qty']); ?></td>
<td class="td_numbig"><?php echo number_format($opt_price); ?></td>
<td class="td_num"><?php echo number_format($sell_price); ?></td>
<td class="td_num"><?php echo number_format($point); ?></td>
<td class="td_mngsmall"><?php echo $opt['ct_status']; ?></td>
</tr>
<?php
$tot_point += $point;
$sell_price = $opt_price * $opt['ct_qty']; $st_count1++;
$point = $opt['ct_point'] * $opt['ct_qty']; if($opt['ct_status'] == '주문')
$st_count2++;
$ct_list[$opt['ct_id']]['name'] = $opt['it_name'];
$ct_list[$opt['ct_id']]['option'] = $opt['ct_option'];
?>
<tr>
<td><?php echo $opt['ct_option']; ?></td>
<td class="td_mngsmall"><?php echo number_format($opt['ct_qty']); ?></td>
<td class="td_numbig"><?php echo number_format($opt_price); ?></td>
<td class="td_num"><?php echo number_format($sell_price); ?></td>
<td class="td_num"><?php echo number_format($point); ?></td>
<td class="td_mngsmall"><?php echo $opt['ct_status']; ?></td>
</tr>
<?php
$tot_point += $point;
$st_count1++;
if($opt['ct_status'] == '주문')
$st_count2++;
}
?>
</tbody>
</table>
</div>
</li>
<?php
} }
}
// 주문 상품의 상태가 모두 주문이면 고객 취소 가능 // 주문 상품의 상태가 모두 주문이면 고객 취소 가능
if($st_count1 > 0 && $st_count1 == $st_count2) if($st_count1 > 0 && $st_count1 == $st_count2)
$custom_cancel = true; $custom_cancel = true;
?> ?>
</ul> </tbody>
</table>
<div id="sod_sts_wrap"> <div id="sod_sts_wrap">
<span class="sound_only">상품 상태 설명</span> <span class="sound_only">상품 상태 설명</span>