상품이 다 똑같고 포장만 달리하는 상품이므로
상품에 대한 후기와 질문답변을 하나로 통합해서 사용하기위해 아래처럼 했습니다.
/mobile/shop/itemuse.php 5라인 추가
$it_id = "특정상품코드";
/mobile/shop/itemqa.php 50라인 추가
$it_id = "특정상품코드";
/item/form.skin.php +더보기 삭제.
이렇게 어느 특정상품 하나의 후기와 질답을 다른 상품들의 보기페이지에 불러오도록 했습니다. 잘된건지 모르겠지만 되긴 하드라구요.
근데 상품설명탭 부분에 숫자표시가 처리가 해당 특정상품 페이지에서만 표시가 되고
나머지에서는 안되서
/shop/item.php 를 어떻게 수정해야 할까요?
Copy
<ul class="sanchor"> <li><a href="#sit_inf" <?php if ($anc_id == 'inf') echo 'class="sanchor_on"'; ?>>상품정보</a></li> <li><a href="#sit_use" <?php if ($anc_id == 'use') echo 'class="sanchor_on"'; ?>>사용후기 <span class="item_use_count"><?php echo $item_use_count; ?></span></a></li> <li><a href="#sit_qa" <?php if ($anc_id == '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="#sit_dvr" <?php if ($anc_id == 'dvr') echo 'class="sanchor_on"'; ?>>배송정보</a></li><?php } ?> <?php if ($default['de_change_content']) { ?><li><a href="#sit_ex" <?php if ($anc_id == 'ex') echo 'class="sanchor_on"'; ?>>교환정보</a></li><?php } ?> <?php if($default['de_rel_list_use']) { ?> <li><a href="#sit_rel" <?php if ($anc_id == 'rel') echo 'class="sanchor_on"'; ?>>관련상품 <span class="item_relation_count"><?php echo $item_relation_count; ?></span></a></li> <?php } ?> </ul>
|
답변 1개 / 댓글 1개
채택된 답변
+20 포인트
2017-02-20 (월) 12:48:05
item.php 165라인~173라인에서 $it_id 대신에 "특정상품코드"로 변경
Copy
// 관리자가 확인한 사용후기의 개수를 얻음$sql = " select count(*) as cnt from `{$g5['g5_shop_item_use_table']}` where it_id = '{$it_id}' and is_confirm = '1' ";$row = sql_fetch($sql);$item_use_count = $row['cnt'];// 상품문의의 개수를 얻음$sql = " select count(*) as cnt from `{$g5['g5_shop_item_qa_table']}` where it_id = '{$it_id}' ";$row = sql_fetch($sql);$item_qa_count = $row['cnt'];
답변에 대한 댓글 1개
망이망소이
2017-02-20 (월) 13:16:58
답변을 작성하려면 로그인이 필요합니다.
테마에서 모바일부분을 작업하다보니 헷갈렸습니다. 제가. 감사합니다.
정리하자면,
저는 테마사용자고 모바일쪽만을 활용하여 쇼핑몰 작업중이어서.
아래부분은
[code]
<ul class="sanchor">
<li><a href="#sit_inf" <?php if ($anc_id == 'inf') echo 'class="sanchor_on"'; ?>>상품정보</a></li>
<li><a href="#sit_use" <?php if ($anc_id == 'use') echo 'class="sanchor_on"'; ?>>사용후기 <span class="item_use_count"><?php echo $item_use_count; ?></span></a></li>
<li><a href="#sit_qa" <?php if ($anc_id == '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="#sit_dvr" <?php if ($anc_id == 'dvr') echo 'class="sanchor_on"'; ?>>배송정보</a></li><?php } ?>
<?php if ($default['de_change_content']) { ?><li><a href="#sit_ex" <?php if ($anc_id == 'ex') echo 'class="sanchor_on"'; ?>>교환정보</a></li><?php } ?>
<?php if($default['de_rel_list_use']) { ?>
<li><a href="#sit_rel" <?php if ($anc_id == 'rel') echo 'class="sanchor_on"'; ?>>관련상품 <span class="item_relation_count"><?php echo $item_relation_count; ?></span></a></li>
<?php } ?>
</ul>
[/code]
/shop/item.php 에 있지만
해당 코드수정은 /mobile/shop/item.php 에서 수정하니 적용이 됐습니다.