상품 리스트에 링크 어떻게 걸수 있을까요?
본문
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.G5_SHOP_CSS_URL.'/style.css">', 0);
?>
<script src="<?php echo G5_THEME_JS_URL; ?>/jquery.shop.list.js"></script>
<!-- 상품진열 20 시작 { -->
<?php
for ($i=0; $row=sql_fetch_array($result); $i++) {
if ($i == 0) {
if ($this->css) {
echo "<ul class=\"{$this->css}\">\n";
} else {
echo "<ul class=\"sct sct_list\">\n";
}
}
if ($i % $this->list_mod == 0)
$sct_clear = ' sct_clear';
else
$sct_clear = '';
echo "<li class=\"sct_li{$sct_clear}\">\n";
if ($this->href) {
echo "<div class=\"sct_img\"><a href=\"{$this->href}{$row['it_id']}\" class=\"sct_a\">\n";
}
if ($this->view_it_img) {
echo get_it_image($row['it_id'], $this->img_width, $this->img_height, '', '', stripslashes($row['it_name']))."\n";
}
if ($this->href) {
echo "</a></div>\n";
}
if ($this->href) {
echo "<div class=\"sct_txt\"><a href=\"{$this->href}{$row['it_id']}\" class=\"sct_tit\">\n";
}
if ($this->view_it_name) {
echo stripslashes($row['it_name'])."</a>\n";
}
if ($this->view_it_cust_price || $this->view_it_price) {
echo "<span class=\"sct_cost\">\n";
if ($this->view_it_price) {
echo display_price(get_price($row), $row['it_tel_inq'])."\n";
}
echo "</span>\n";
}
if ($this->href) {
echo "</div>\n";
}
echo"<div class=\"sct_cart\">
<div class=\"sct_cart_btn\" style=\"width:{$this->img_width}px;height:{$this->img_height}px\">
<button type=\"button\" class=\"btn_wish\" data-it_id=\"{$row['it_id']}\">위시</button>
<button type=\"button\" class=\"btn_cart\" data-it_id=\"{$row['it_id']}\">장바구니</button>
</div>
<div class=\"sct_cart_op\" style=\"width:{$this->img_width}px;height:{$this->img_height}px\"></div>
</div>\n";
echo"</li>\n";
}
if ($i > 0) echo "</ul>\n";
if($i == 0) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\n";
?>
<!-- } 상품진열 10 끝 -->
현재는 상품명에만 링크값이 먹고 있습니다.
이미지에도 링크를 넣고 싶은데 소스보기가 너무 어렵네요 ㅠㅠ