영카트 분류관리에 분류추가해도 메뉴에 노출이 되지않아요
본문
여기서 분류를 추가했습니다.
하지만 상품페이지의 왼쪽 메뉴에 추가 된 분류가 노출이 되지 않는데 왜그런걸까요?ㅠㅠ
해당 관련 소스입니다ㅠㅠ
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if(defined('G5_THEME_PATH')) {
require_once(G5_THEME_SHOP_PATH.'/shop.head.php');
return;
}
include_once(G5_PATH.'/head.sub.php');
include_once(G5_LIB_PATH.'/outlogin.lib.php');
include_once(G5_LIB_PATH.'/poll.lib.php');
include_once(G5_LIB_PATH.'/visit.lib.php');
include_once(G5_LIB_PATH.'/connect.lib.php');
include_once(G5_LIB_PATH.'/popular.lib.php');
include_once(G5_LIB_PATH.'/latest.lib.php');
if ($site =='e' || $site == 'en' || $_SESSION['site'] == 'e')
{
$t = '';
$me = "_e";
$bot = "_en";
}
else {
$t = '_k';
$me = "";
$bot = "";
}
?>
<style type="text/css">
@import url(http://fonts.googleapis.com/earlyaccess/nanumgothic.css);
@import url(http://fonts.googleapis.com/earlyaccess/nanummyeongjo.css);
.Wrap_pro {}
.Wrap_pro h4{font-size:16px; font-family:dotum; font-weight:bold}
ul, li {list-style:none;}
img {border:0;}
#product {width:690px; background:#f5f5f5; height:290px;padding:15px; border:solid 1px #d1d1d1}
#product ul{float:left}
#nav{width:200px; float:left; width:220px; margin-top:0px; margin-left:25px;}
#nav li {float:left; width:108px;}
#nav img {width:108px; height:70px}
#nav a{display:block; border:1px solid #bbb;-webkit-border-radius:5px;}
#nav a.active {border:1px solid #fff;}
#window{width:439px; float:left}
#window img {width:439px; height:286px;}
</style>
<table border="0" width="924" cellpadding="0" cellspacing="0" align="center">
<tr>
<td width="924" height="50" colspan="3" align="right"><?include "../../topmenu{$t}.html";?></td>
</tr>
<tr>
<td width="924" colspan="2"><?include "../../menu{$me}.html";?></td>
</tr>
<tr>
<td width="190" valign="top"><p><img src="http://skinc.co.kr/img/title_left_products.gif" width="190" height="65">
<div id="left">
<style>
#left ul li {border-bottom:1px solid #dcdcdc; color:#515151; padding:12px 0 12px 10px; font-size:12px;}
#left ul li a {width:100% ; height:100%; display:block; color:#424242; font-family:'맑은고딕' !important; font-size:12px !important;}
#left ul li a:hover {color:#295f9f; background: url(/img/left_bul.png) no-repeat 170px 0px; }
#left ul li a.on {color:#295f9f; background:url(/img/left_bul.png) no-repeat 170px 0px; font-weight:bold }
ul.topnav ul {display: none;}
ul.sec {margin-left:15px; }
ul.sec li a{font-size:12px; color:#333}
ul.sec li a:hover{color:#000 !important; background:none !important;}
ul.sec li:last-child {border-bottom:none !important; padding-bottom:0 !important; }
</style>
<script type="text/javascript" src="./scriptbreaker-multiple-accordion-1.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$(".topnav").accordion({
accordion:true,
speed: 500,
closedSign: '',
openedSign: ''
});
});
</script>
<?php
$sql = "SELECT it_id, ca_id, ca_id2, it_name, it_en_name FROM g5_shop_item WHERE it_use=1 ORDER BY ca_id ASC, ca_id2 ASC";
$result = sql_query($sql);
?>
<ul class="topnav">
<?php
for ($i=0; $row=sql_fetch_array($result); $i++) {
if(!$it_id && $i === 0) {
$it_id = $row['it_id'];
$view_ca_id = ($view_ca_id) ? $view_ca_id : '';
}
if($temp_ca_id != substr($row['ca_id'], 0, 2)) {
$no = 0;
$temp_ca_id = substr($row['ca_id'], 0, 2);
$ca_row = sql_fetch("SELECT ca_name, ca_en_name FROM g5_shop_category WHERE ca_use=1 AND ca_id='{$temp_ca_id}'");
$_ca_name = ($_SESSION['site'] == 'e') ? $ca_row['ca_en_name'] : $ca_row['ca_name'];
if($i !== 0 && $no === 0) {
echo '</ul>'.PHP_EOL;
echo '</li>'.PHP_EOL;
}
echo '<li>'.PHP_EOL;
echo '<a href="#"><strong>'.$_ca_name.'</strong></a>'.PHP_EOL;
}
$_it_name = ($_SESSION['site'] == 'e') ? $row['it_en_name'] : $row['it_name'];
if($no == 0) {
if($view_ca_id == $temp_ca_id) {
echo '<ul class="sec" style="display:block">'.PHP_EOL;
}
else {
echo '<ul class="sec">'.PHP_EOL;
}
}
echo '<li><a href="/yc5/shop/product.php?ca_name='.$_ca_name.'&view_ca_id='.$temp_ca_id.'&it_id='.$row['it_id'].'">'.$_it_name.'</a></li>'.PHP_EOL;
$no++;
}
?>
</ul>
<p style="padding-top:15px;">
<a href="/catalog.pdf" style=" font-size:16px; font-weight:600; color:#5F67AE;font-family:Nanum Gothic, 나눔고딕" target="_blank"><?php echo ($_SESSION['site'] == 'e') ? 'Catalog' : '카다로그' ?></a>
</p>
<p><img src="/img/service.gif" align="bottom"></p>
</div>
</p></p>
</td>
<?php
$sql = " select a.*, b.ca_name, b.ca_en_name, b.ca_use from {$g5['g5_shop_item_table']} a, {$g5['g5_shop_category_table']} b where a.it_id = '$it_id' and a.ca_id = b.ca_id ";
$it = sql_fetch($sql);
?>
<td width="734" valign="top"><table border="0" align="center" cellpadding="0" cellspacing="0" height="166">
<tr>
<td width="364" height="43" background="title_a1.gif" style="padding-left:15px; font-weight:bold; font-size:18px; font-family:'맑은고딕'">
<?php
if ($_SESSION['site'] == 'e')
echo ($it['ca_en_name']) ? $it['ca_en_name']:$it['ca_name'];
else
echo $it['ca_name']
?>
</td>
<td width="370" height="66" valign="middle" bgcolor="#ededed">
<p align="right" class="style1"><span style="font-size:9pt;"><span style="font-size:9pt;"><a href="/index.html">HOME</a><span style="font-size:9pt;"> <img src="http://skinc.co.kr/img/e_img/icon2.gif"> </span><span style="font-size:9pt;"><span style="font-size:9pt;"><span style="font-size:9pt;"> </span><a href="/kp1-1.html"><?=($_SESSION['site'] == 'e') ? 'Products':'제품소개'?></a><span style="font-size:9pt;"><img src="http://skinc.co.kr/img/e_img/icon2.gif"></span></span></span>
<?
if ($_SESSION['site'] == 'e')
echo ($it['it_en_name']) ? $it['it_en_name']:$it['it_name'];
else
echo $it['it_name']
?>
</td>
</tr>
<tr>
<td colspan="2" height="25" align="center">
<?
$ca_2ndinfo = get_ca_name($it['ca_id2']);
if ($_SESSION['site'] == 'e')
{
if ($ca_2ndinfo['ca_en_name'])
echo "<div style='text-align:left;padding-left:10px;font-size:14px;font-weight:bold; margin-bottom:20px; font-family:'맑은고딕''>{$ca_2ndinfo['ca_en_name']}</div>";
else
echo "<div style='text-align:left;padding-left:10px;font-size:14px;font-weight:bold; margin-bottom:20px;font-family:'맑은고딕''>{$ca_2ndinfo['ca_name']}</div>";
}
else
echo "<div style='text-align:left;padding-left:10px;font-size:14px;font-weight:bold; margin-bottom:20px;font-family:'맑은고딕''>{$ca_2ndinfo['ca_name']}</div>";
$ca_list = get_ca_goods($it['ca_id'], $it['ca_id2']);
echo '<span class="style5" style="display:inline-block; margin-bottom:20px; font-size:16px"><strong>[</strong>';
for ($i=1; $row=sql_fetch_array($ca_list); $i++)
{
if ($i > 1)
echo " <strong>|</strong> ";
$ca_1stinfo = get_ca_name($row['ca_id']);
if ( $_SESSION['site'] == "e")
{
$t_caname = ($ca_1stinfo['ca_en_name']) ? $ca_1stinfo['ca_en_name']:$ca_1stinfo['ca_name'];
$t_itname = ($row['it_en_name']) ? $row['it_en_name']:$row['it_name'];
echo "<a href='/yc5/shop/product.php?ca_name={$t_caname}&it_id={$row['it_id']}'>{$t_itname}</a>";
}
else
echo "<a href='/yc5/shop/product.php?ca_name={$ca_1stinfo['ca_name']}&it_id={$row['it_id']}'>{$row['it_name']}</a>";
if ($it_id == $row['it_id'])
{
if ( $_SESSION['site'] == "e")
$sel_it_name = $i.". ".$t_itname;
else
$sel_it_name = $i.". ".$row['it_name'];
}
}
echo "<strong>]</strong></span>";
echo "<div style='text-align:left;padding-left:10px;font-size:14px;font-weight:bold;'><strong>{$sel_it_name} </strong></div>";
$img_cnt = 0;
for($k = 1; $k <= 10; $k++)
{
$it_img = G5_DATA_PATH.'/item/'.$it['it_img'.$k];
if(is_file($it_img) && $it['it_img'.$k])
{
$img_cnt++;
}
}
?>
<div class="Wrap_pro" style="padding-top:20px;">
<div id="product" style="<?=($img_cnt > 8) ? 'height:360px;':''?>">
<div id="window"><img src="<?php echo G5_DATA_URL; ?>/item/<?php echo $it['it_img1']; ?>" alt="" width=439 height=286 alt="" /></div>
<ul id="nav">
<?php
for($k = 1; $k <= 10; $k++)
{
$it_img = G5_DATA_PATH.'/item/'.$it['it_img'.$k];
if(is_file($it_img) && $it['it_img'.$k])
{
$size = @getimagesize($it_img);
$thumb = get_it_thumbnail($it['it_img'.$k], 25, 25);
?>
<li><a href="<?php echo G5_DATA_URL; ?>/item/<?php echo $it['it_img'.$k]; ?>" class="<?=($k == 1)? 'active':''?>"><img src="<?php echo G5_DATA_URL; ?>/item/<?php echo $it['it_img'.$k]; ?>" alt="" width=108 height=70/></a></li>
<?php
}
else
{
?>
<?php
}
}
?>
</ul>
</div>
<script type="text/javascript">
$(document).ready(function(){
$('#nav a').mouseover(function(e){
e.preventDefault();
$('#nav a').removeClass('active');
$(this).addClass('active');
img_url = $(this).attr('href');
$('#window img').attr('src',img_url);
});
})
</script>
<p>
<?php
if ($_SESSION['site'] == "e")
//echo nl2br($it['it_en_explan']);
echo $it['it_en_explan'];
else
//echo nl2br($it['it_explan']);
echo $it['it_explan'];
!-->
답변 2
아래 $sql은 등록된 상품을 불러오신거 같습니다.
상품에 등록된 분류만 왼쪽에 보여지게되는것이죠
만약 상품을 추가하시고 추가하신 신규분류를 매칭하시면 아마 메뉴에 나올것으로 보입니다.
$sql = "SELECT it_id, ca_id, ca_id2, it_name, it_en_name FROM g5_shop_item WHERE it_use=1 ORDER BY ca_id ASC, ca_id2 ASC";
$result = sql_query($sql);
?>
<ul class="topnav">
<?php
for ($i=0; $row=sql_fetch_array($result); $i++) {
해당 소스는 상품리스트 관련 소스 인듯 한데요
왼쪽 메뉴는 자동확장되도록 개발된게 아니라 고정메뉴로 처리된거라 해당 분류가 추가된다고 반영되는 방식이 아닌듯 합니다.
답변을 작성하시기 전에 로그인 해주세요.