쇼핑몰: 레이아웃의 장바구니 위시리스트 목록 마크업 및 스타일 완료

This commit is contained in:
whitedot
2013-07-02 09:35:14 +09:00
parent d35cdb30ce
commit 10e94623c0
4 changed files with 84 additions and 48 deletions

View File

@ -2,21 +2,34 @@
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table cellpadding=0 cellspacing=0 bgcolor=#FFFFFF>
<tr><td><a href='<?php echo G4_SHOP_URL; ?>/cart.php'><img src='<?php echo G4_SHOP_URL; ?>/img/bar_cart.gif' border=0></a></td></tr>
<?php
$hsql = " select a.it_id, a.it_name, a.ct_qty from {$g4['shop_cart_table']} a, {$g4['shop_item_table']} b where a.uq_id = '".get_session('ss_uq_id')."' and a.it_id = b.it_id order by a.ct_id ";
$hresult = sql_query($hsql);
for ($i=0; $row=sql_fetch_array($hresult); $i++)
{
echo "<tr><td height=22><nobr style='display:block; overflow:hidden; width:170px;'>&nbsp;&nbsp;· ";
$it_name = get_text($row['it_name']);
// 이미지로 할 경우
//$it_name = get_it_image($row[it_id], 50, 50, true);
echo "<a href=\"".G4_SHOP_URL."/cart.php\">$it_name</a></nobr></td></tr>\n";
}
<!-- 장바구니 간략 보기 시작 { -->
<aside id="sbsk">
<h2>장바구니</h2>
if ($i==0)
echo "<tr><td><img src='".G4_SHOP_URL."/img/nocart.gif'></td></tr>\n";
<ul>
<?php
$hsql = "
select a.it_id, a.it_name, a.ct_qty from {$g4['shop_cart_table']} a, {$g4['shop_item_table']} b
where a.uq_id = '".get_session('ss_uq_id')."'
and a.it_id = b.it_id
order by a.ct_id
";
$hresult = sql_query($hsql);
for ($i=0; $row=sql_fetch_array($hresult); $i++)
{
echo '<li>';
$it_name = get_text($row['it_name']);
// 이미지로 할 경우
//$it_name = get_it_image($row[it_id], 50, 50, true);
echo '<a href="'.G4_SHOP_URL.'/cart.php">'.$it_name.'</a>';
echo '</li>';
}
if ($i==0)
echo '<li id="sbsk_empty">장바구니 상품 없음</li>'.PHP_EOL;
?>
</table>
</ul>
</aside>
<!-- } 장바구니 간략 보기 끝 -->