하위분류 분류메뉴 사라짐ㅠㅠ 도와주세요!!! 채택완료
dpsTldpvm
4년 전
조회 1,832
※ 문제점 ※ : 제일 하위 분류 클릭시 기존 분류가 모두 안보임
a1 → a170 : a170 클릭시 a1 없어짐 (1차 기본 분류가 안보임)
제일 하위 분류 (a170) 클릭하면 기존 분류가 모두 보이게끔하려면 어떻게 해야하나요?
제가 소스를 볼 줄을 몰라서 어떻게 수정하면 되는지,
초등학생도 알아듣게끔 찬찬히 알려주실 수 있을까요...?ㅜㅜ
▼ 현재 분류코드


</p>
<p><?php</p>
<p>if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가</p>
<p> </p>
<p>$str = '';</p>
<p>$exists = false;</p>
<p> </p>
<p>$ca_id_len = strlen($ca_id);</p>
<p>$len2 = $ca_id_len + 2;</p>
<p>$len4 = $ca_id_len + 4;</p>
<p> </p>
<p>$sql = " select ca_id, ca_name from {$g5['g5_shop_category_table']} where ca_id like '$ca_id%' and ca_use = '1' order by ca_order, ca_id ";</p>
<p>$result = sql_query($sql);</p>
<p>while ($row=sql_fetch_array($result)) {</p>
<p> </p>
<p> $row2 = sql_fetch(" select count(*) as cnt from {$g5['g5_shop_item_table']} where (ca_id like '{$row['ca_id']}%' or ca_id2 like '{$row['ca_id']}%' or ca_id3 like '{$row['ca_id']}%') and it_use = '1' ");</p>
<p> </p>
<p> $str .= '<li><a href="'.shop_category_url($row['ca_id']).'">'.$row['ca_name'].' ('.$row2['cnt'].')</a></li>';</p>
<p> $exists = true;</p>
<p>}</p>
<p> </p>
<p>if ($exists) {</p>
<p> </p>
<p> // add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨</p>
<p> add_stylesheet('<link rel="stylesheet" href="'.G5_SHOP_SKIN_URL.'/style.css">', 0);</p>
<p>?></p>
<p> </p>
<p><!-- 상품분류 1 시작 { --></p>
<p><aside id="sct_ct_1" class="sct_ct"></p>
<p> <h2>현재 상품 분류와 관련된 분류</h2></p>
<p> <ul></p>
<p> <?php echo $str; ?></p>
<p> </ul></p>
<p></aside></p>
<p><!-- } 상품분류 1 끝 --></p>
<p> </p>
<p><?php } ?></p>
<p>
댓글을 작성하려면 로그인이 필요합니다.
답변 2개
채택된 답변
+20 포인트
4년 전
skin\shop\basic\listcategory.skin.php 파일을 아래와 같이 수정해보세요.
</p>
<p>if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가</p>
<p> </p>
<p>$str = '';</p>
<p>$exists = false;</p>
<p> </p>
<p>$ca_id2 = substr($ca_id,0,2);</p>
<p>$ca_id_len = strlen($ca_id2);</p>
<p>$len2 = $ca_id_len + 2;</p>
<p>$len4 = $ca_id_len + 4;</p>
<p> </p>
<p>$sql = " select ca_id, ca_name from {$g5['g5_shop_category_table']} where ca_id like '$ca_id2%' and length(ca_id) = $len2 and ca_use = '1' order by ca_order, ca_id ";</p>
<p>$result = sql_query($sql);</p>
<p>while ($row=sql_fetch_array($result)) {</p>
<p> </p>
<p> $row2 = sql_fetch(" select count(*) as cnt from {$g5['g5_shop_item_table']} where (ca_id like '{$row['ca_id']}%' or ca_id2 like '{$row['ca_id']}%' or ca_id3 like '{$row['ca_id']}%') and it_use = '1' ");</p>
<p> </p>
<p> $str .= '<li><a href="'.shop_category_url($row['ca_id']).'">'.$row['ca_name'].' ('.$row2['cnt'].')</a></li>';</p>
<p> $exists = true;</p>
<p>}</p>
<p>(이하 생략)</p>
<p>
로그인 후 평가할 수 있습니다
답변에 대한 댓글 6개
d
dpsTldpvm
4년 전
수정해봤지만 안됩니당...
e
eyekiss
4년 전
위에 소스를 그대로 가져다 붙이세요..
$ca_id2 가 핵심입니다.
$ca_id2 가 핵심입니다.
d
dpsTldpvm
4년 전
그대로 갖다가 붙인겁니다..ㅜ
skin\shop\basic\listcategory.skin.php
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$str = '';
$exists = false;
$ca_id2 = substr($ca_id,0,2);
$ca_id_len = strlen($ca_id2);
$len2 = $ca_id_len + 2;
$len4 = $ca_id_len + 4;
$sql = " select ca_id, ca_name from {$g5['g5_shop_category_table']} where ca_id like '$ca_id2%' and length(ca_id) = $len2 and ca_use = '1' order by ca_order, ca_id ";
$result = sql_query($sql);
while ($row=sql_fetch_array($result)) {
$row2 = sql_fetch(" select count(*) as cnt from {$g5['g5_shop_item_table']} where (ca_id like '{$row['ca_id']}%' or ca_id2 like '{$row['ca_id']}%' or ca_id3 like '{$row['ca_id']}%') and it_use = '1' ");
$str .= '<li><a href="'.shop_category_url($row['ca_id']).'">'.$row['ca_name'].' ('.$row2['cnt'].')</a></li>';
$exists = true;
}
if ($exists) {
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.G5_SHOP_SKIN_URL.'/style.css">', 0);
?>
<!-- 상품분류 1 시작 { -->
<aside id="sct_ct_1" class="sct_ct">
<h2>현재 상품 분류와 관련된 분류</h2>
<ul>
<?php echo $str; ?>
</ul>
</aside>
<!-- } 상품분류 1 끝 -->
<?php } ?>
skin\shop\basic\listcategory.skin.php
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$str = '';
$exists = false;
$ca_id2 = substr($ca_id,0,2);
$ca_id_len = strlen($ca_id2);
$len2 = $ca_id_len + 2;
$len4 = $ca_id_len + 4;
$sql = " select ca_id, ca_name from {$g5['g5_shop_category_table']} where ca_id like '$ca_id2%' and length(ca_id) = $len2 and ca_use = '1' order by ca_order, ca_id ";
$result = sql_query($sql);
while ($row=sql_fetch_array($result)) {
$row2 = sql_fetch(" select count(*) as cnt from {$g5['g5_shop_item_table']} where (ca_id like '{$row['ca_id']}%' or ca_id2 like '{$row['ca_id']}%' or ca_id3 like '{$row['ca_id']}%') and it_use = '1' ");
$str .= '<li><a href="'.shop_category_url($row['ca_id']).'">'.$row['ca_name'].' ('.$row2['cnt'].')</a></li>';
$exists = true;
}
if ($exists) {
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.G5_SHOP_SKIN_URL.'/style.css">', 0);
?>
<!-- 상품분류 1 시작 { -->
<aside id="sct_ct_1" class="sct_ct">
<h2>현재 상품 분류와 관련된 분류</h2>
<ul>
<?php echo $str; ?>
</ul>
</aside>
<!-- } 상품분류 1 끝 -->
<?php } ?>
e
eyekiss
4년 전
저는 잘되는데.. 혹시 다른 스킨인지 확인해보세요..
skin\shop\basic\listcategory.skin.php 을 삭제했을때..
분류가 없어지지 않는다면, 다른 파일입니다.
skin\shop\basic\listcategory.skin.php 을 삭제했을때..
분류가 없어지지 않는다면, 다른 파일입니다.
d
dpsTldpvm
4년 전
테마는 buzinga 하나밖에 안깔았고 /html/shop/theme/buzinga/skin/shop/basic 의 listcategory.skin.php를 2,3까지 지워봤는데 1차 분류가 멀쩡히 살아있습니다. 1차분류도 없어져야되는거죠? 그럼 경로가 다른데인건가요? 반응형 테마라 경로가 다른건가? 뭐지.. 위의 gif는 데모사이트도 저와같아 가져온거뿐인데 상관있나ㅓ요?
┌ buzinga 반응형 데모 사이트
https://theme.sir.kr/youngcart53/shop/list.php?ca_id=10
┌ buzinga 반응형 데모 사이트
https://theme.sir.kr/youngcart53/shop/list.php?ca_id=10
e
eyekiss
4년 전
\skin\shop\basic\listcategory.skin.php 파일을 수정해보세요..
댓글을 작성하려면 로그인이 필요합니다.
답변에 대한 댓글 1개
d
dpsTldpvm
4년 전
안되네요╯︿╰
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인