카테고리 문제인데요

매출이 오르면 내리는 수수료! 지금 수수료센터에서 전자결제(PG)수수료 비교견적 신청해 보세요!
카테고리 문제인데요

QA

카테고리 문제인데요

본문


헤드 메뉴부분에 보이는 SHOP   /    키즈&쥬니어 가 따로있는데


20ee2bf06acbb4574676428cc4c24980_1504508076_3122.jpg
 

각각 메뉴로 눌러 들어가면 내용 왼쪽사이드에 보이는 메뉴에 샵이랑 키즈쥬니어가 같이나타나서요 ㅠㅠ


20ee2bf06acbb4574676428cc4c24980_1504508115_1962.jpg




shop을 누르면 shop만, 키즈쥬니어를 누르면 키즈쥬니어만 떴으면 하는데


제가 작업한게 아니라 어떻게 수정을 해야할지 잘 모르겠어요 ㅠㅠ


작업자분한테 연락했더니 listcategory.skin 여기서 수정하셨다고 하는데 긁어오신거라 잘모른다고 하셔서요



어떤걸 수정해야 하나만 뜰까요?



 

<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

$str = '';
$exists = false;

$depth2_ca_id = substr($ca_id, 0, 2);

$sql = " select ca_id, ca_name from {$g5['g5_shop_category_table']} where ca_id like '${depth2_ca_id}%' and length(ca_id) = 4 and ca_use = '1' order by ca_order, ca_id ";
$result = sql_query($sql);
while ($row=sql_fetch_array($result)) {
    if (preg_match("/^{$row['ca_id']}/", $ca_id))
        $sct_ct_here = 'sct_ct_here';
    else
        $sct_ct_here = '';
    $str .= '<li><a href="./list.php?ca_id='.$row['ca_id'].'" class="'.$sct_ct_here.'">'.$row['ca_name'].'</a></li>';
    $exists = true;
}

if ($exists) {

    // add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
    add_stylesheet('<link rel="stylesheet" href="'.G5_SHOP_CSS_URL.'/style.css">', 0);
?>

<!-- 상품분류 3 시작 { -->
<aside id="sct_ct_2" class="sct_ct">
    <table cellpadding="0" cellspacing="0" border="0">
    <tr>    
        <?php
        // 1단계 분류 판매 가능한 것만
        $hsql = " select ca_id, ca_name from {$g5['g5_shop_category_table']} where length(ca_id) = '2' and ca_use = '1' order by ca_order, ca_id ";
        $hresult = sql_query($hsql);
        $gnb_zindex = 999; // gnb_1dli z-index 값 설정용
        for ($i=0; $row=sql_fetch_array($hresult); $i++)
        {
            $gnb_zindex -= 1; // html 구조에서 앞선 gnb_1dli 에 더 높은 z-index 값 부여
            // 2단계 분류 판매 가능한 것만
            $sql2 = " select ca_id, ca_name from {$g5['g5_shop_category_table']} where LENGTH(ca_id) = '4' and SUBSTRING(ca_id,1,2) = '{$row['ca_id']}' and ca_use = '1' order by ca_order, ca_id ";
            $result2 = sql_query($sql2);
            $count = sql_num_rows($result2);
        ?>
       <td>
            <a class="cate_t_01" style="color:#000000;"><?php echo $row['ca_name']; ?></a>
            <?php
            for ($j=0; $row2=sql_fetch_array($result2); $j++)
            {
            if ($j==0) echo '<ul class="cate_t_01" style="z-index:'.$gnb_zindex.'">';
            ?>
        
            <?php }
            if ($j>0) echo '</ul>';
            ?>

            <?php } ?>
        </td>
    </tr>
</table>
    <!-- <table cellpadding="0" cellspacing="0">
        <tr>
            <td class="cate_t_01"><?php echo $ca['ca_name']; ?></td>
        </tr>
    </table> -->
    <ul>
        <?php echo $str; ?>
    </ul>
    <table cellpadding="0" cellspacing="0">
        <tr>
            <td class="cate_t_02"><a href="<?php echo G5_SHOP_URL; ?>/personalpay.php">개인결제</td>
        </tr>
    </table>
    
</aside>
<!-- } 상품분류 3 끝 -->

<?php } ?>



이 질문에 댓글 쓰기 :

답변 2

다시보니 그게 아니고 쿼리를 좀 수정하셔야 겠네요..


$sql = " select ca_id, ca_name from {$g5['g5_shop_category_table']} where ca_id =$ca_id and length(ca_id) = 4 and ca_use = '1' order by ca_order, ca_id ";


$str .= '<li><a href="./list.php?ca_id='.$row['ca_id'].'" class="'.$sct_ct_here.'">'.$row['ca_name'].'</a></li>';


여기를


$str = '<li><a href="./list.php?ca_id='.$row['ca_id'].'" class="'.$sct_ct_here.'">'.$row['ca_name'].'</a></li>';


로 바꾸면 안될까요?

답변을 작성하시기 전에 로그인 해주세요.
전체 7
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT