모바일 관련상품 설정 추가
This commit is contained in:
@ -105,13 +105,15 @@ $sql = " select count(*) as cnt from `{$g5['g5_shop_item_qa_table']}` where it_i
|
||||
$row = sql_fetch($sql);
|
||||
$item_qa_count = $row['cnt'];
|
||||
|
||||
// 관련상품의 개수를 얻음
|
||||
$sql = " select count(*) as cnt
|
||||
from {$g5['g5_shop_item_relation_table']} a
|
||||
left join {$g5['g5_shop_item_table']} b on (a.it_id2=b.it_id and b.it_use='1')
|
||||
where a.it_id = '{$it['it_id']}' ";
|
||||
$row = sql_fetch($sql);
|
||||
$item_relation_count = $row['cnt'];
|
||||
if ($default['de_rel_list_use']) {
|
||||
// 관련상품의 개수를 얻음
|
||||
$sql = " select count(*) as cnt
|
||||
from {$g5['g5_shop_item_relation_table']} a
|
||||
left join {$g5['g5_shop_item_table']} b on (a.it_id2=b.it_id and b.it_use='1')
|
||||
where a.it_id = '{$it['it_id']}' ";
|
||||
$row = sql_fetch($sql);
|
||||
$item_relation_count = $row['cnt'];
|
||||
}
|
||||
|
||||
// 상품품절체크
|
||||
$is_soldout = is_soldout($it['it_id']);
|
||||
|
||||
@ -40,13 +40,15 @@ $sql = " select count(*) as cnt from `{$g5['g5_shop_item_qa_table']}` where it_i
|
||||
$row = sql_fetch($sql);
|
||||
$item_qa_count = $row['cnt'];
|
||||
|
||||
// 관련상품의 개수를 얻음
|
||||
$sql = " select count(*) as cnt
|
||||
from {$g5['g5_shop_item_relation_table']} a
|
||||
left join {$g5['g5_shop_item_table']} b on (a.it_id2=b.it_id and b.it_use='1')
|
||||
where a.it_id = '{$it['it_id']}' ";
|
||||
$row = sql_fetch($sql);
|
||||
$item_relation_count = $row['cnt'];
|
||||
if ($default['de_rel_list_use']) {
|
||||
// 관련상품의 개수를 얻음
|
||||
$sql = " select count(*) as cnt
|
||||
from {$g5['g5_shop_item_relation_table']} a
|
||||
left join {$g5['g5_shop_item_table']} b on (a.it_id2=b.it_id and b.it_use='1')
|
||||
where a.it_id = '{$it['it_id']}' ";
|
||||
$row = sql_fetch($sql);
|
||||
$item_relation_count = $row['cnt'];
|
||||
}
|
||||
|
||||
function pg_anchor($info) {
|
||||
global $default;
|
||||
@ -60,7 +62,9 @@ function pg_anchor($info) {
|
||||
<li><a href="<?php echo $href; ?>&info=qa" <?php if ($info == 'qa') echo 'class="sanchor_on"'; ?>>상품문의 <span class="item_qa_count"><?php echo $item_qa_count; ?></span></a></li>
|
||||
<?php if ($default['de_baesong_content']) { ?><li><a href="<?php echo $href; ?>&info=dvr" <?php if ($info == 'dvr') echo 'class="sanchor_on"'; ?>>배송정보</a></li><?php } ?>
|
||||
<?php if ($default['de_change_content']) { ?><li><a href="<?php echo $href; ?>&info=ex" <?php if ($info == 'ex') echo 'class="sanchor_on"'; ?>>교환정보</a></li><?php } ?>
|
||||
<?php if ($default['de_rel_list_use']) { ?>
|
||||
<li><a href="<?php echo $href; ?>&info=rel" <?php if ($info == 'rel') echo 'class="sanchor_on"'; ?>>관련상품 <span class="item_relation_count"><?php echo $item_relation_count; ?></span></a></li>
|
||||
<?php } ?>
|
||||
<li><button type="button" id="iteminfo_close" onclick="self.close();">창닫기</button></li>
|
||||
</ul>
|
||||
<?php
|
||||
|
||||
@ -296,7 +296,7 @@ $href = G5_SHOP_URL.'/iteminfo.php?it_id='.$it_id;
|
||||
<li><a href="<?php echo $href; ?>&info=qa" target="_blank">상품문의 <span class="item_qa_count"><?php echo $item_qa_count; ?></span></a></li>
|
||||
<?php if ($default['de_baesong_content']) { ?><li><a href="<?php echo $href; ?>&info=dvr" target="_blank">배송정보</a></li><?php } ?>
|
||||
<?php if ($default['de_change_content']) { ?><li><a href="<?php echo $href; ?>&info=ex" target="_blank">교환정보</a></li><?php } ?>
|
||||
<?php if($default['de_rel_list_use']) {?>
|
||||
<?php if($default['de_mobile_rel_list_use']) {?>
|
||||
<li><a href="<?php echo $href; ?>&info=rel" target="_blank">관련상품 <span class="item_relation_count"><?php echo $item_relation_count; ?></span></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
|
||||
@ -11,7 +11,7 @@ add_stylesheet('<link rel="stylesheet" href="'.G5_MSHOP_SKIN_URL.'/style.css">',
|
||||
<?php
|
||||
$sql = " select b.* from {$g5['g5_shop_item_relation_table']} a left join {$g5['g5_shop_item_table']} b on (a.it_id2=b.it_id) where a.it_id = '{$it['it_id']}' and b.it_use='1' ";
|
||||
|
||||
$list = new item_list("relation.10.skin.php", $default['de_rel_list_mod'], 1, $default['de_rel_img_width'], $default['de_rel_img_height']);
|
||||
$list = new item_list($default['de_mobile_rel_list_skin'], 1, 1, $default['de_mobile_rel_img_width'], $default['de_mobile_rel_img_height']);
|
||||
$list->set_mobile(true);
|
||||
$list->set_query($sql);
|
||||
$list->set_view('sns', true);
|
||||
|
||||
@ -5,22 +5,16 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
add_stylesheet('<link rel="stylesheet" href="'.G5_MSHOP_SKIN_URL.'/style.css">', 0);
|
||||
?>
|
||||
|
||||
<script src="<?php echo G5_JS_URL ?>/jquery.fancylist.js"></script>
|
||||
|
||||
<!-- 상품진열 10 시작 { -->
|
||||
<?php
|
||||
for ($i=1; $row=sql_fetch_array($result); $i++) {
|
||||
if ($this->list_mod >= 2) { // 1줄 이미지 : 2개 이상
|
||||
if ($i%$this->list_mod == 0) $sct_last = ' sct_last'; // 줄 마지막
|
||||
else if ($i%$this->list_mod == 1) $sct_last = ' sct_clear'; // 줄 첫번째
|
||||
else $sct_last = '';
|
||||
} else { // 1줄 이미지 : 1개
|
||||
$sct_last = 'sct_clear';
|
||||
}
|
||||
|
||||
if ($i == 1) {
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
if ($i == 0) {
|
||||
if ($this->css) {
|
||||
echo "<ul class=\"{$this->css}\">\n";
|
||||
echo "<ul id=\"sct_wrap\" class=\"{$this->css}\">\n";
|
||||
} else {
|
||||
echo "<ul class=\"sct sct_10\">\n";
|
||||
echo "<ul id=\"sct_wrap\" class=\"sct sct_10\">\n";
|
||||
}
|
||||
}
|
||||
|
||||
@ -38,6 +32,10 @@ for ($i=1; $row=sql_fetch_array($result); $i++) {
|
||||
echo "</a>\n";
|
||||
}
|
||||
|
||||
if ($this->view_it_icon) {
|
||||
echo "<div class=\"sct_icon\">".item_icon($row)."</div>\n";
|
||||
}
|
||||
|
||||
if ($this->view_it_id) {
|
||||
echo "<span class=\"sct_id\"><".stripslashes($row['it_id'])."></span>\n";
|
||||
}
|
||||
@ -74,10 +72,6 @@ for ($i=1; $row=sql_fetch_array($result); $i++) {
|
||||
|
||||
}
|
||||
|
||||
if ($this->view_it_icon) {
|
||||
echo "<div class=\"sct_icon\">".item_icon($row)."</div>\n";
|
||||
}
|
||||
|
||||
if ($this->view_sns) {
|
||||
$sns_url = G5_SHOP_URL.'/item.php?it_id='.$row['it_id'];
|
||||
$sns_title = get_text($row['it_name']).' | '.get_text($config['cf_title']);
|
||||
@ -96,8 +90,14 @@ for ($i=1; $row=sql_fetch_array($result); $i++) {
|
||||
echo "</li>\n";
|
||||
}
|
||||
|
||||
if ($i > 1) echo "</ul>\n";
|
||||
if ($i > 0) echo "</ul>\n";
|
||||
|
||||
if($i == 1) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\n";
|
||||
if($i == 0) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\n";
|
||||
?>
|
||||
<!-- } 상품진열 10 끝 -->
|
||||
<!-- } 상품진열 10 끝 -->
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$("#sct_wrap").fancyList("li.sct_li", "sct_clear");
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user