사용후기, 상품문의를 하나로 사용하기 위해
본문
상품이 다 똑같고 포장만 달리하는 상품이므로
상품에 대한 후기와 질문답변을 하나로 통합해서 사용하기위해 아래처럼 했습니다.
/mobile/shop/itemuse.php 5라인 추가
$it_id = "특정상품코드";
/mobile/shop/itemqa.php 50라인 추가
$it_id = "특정상품코드";
/item/form.skin.php +더보기 삭제.
이렇게 어느 특정상품 하나의 후기와 질답을 다른 상품들의 보기페이지에 불러오도록 했습니다. 잘된건지 모르겠지만 되긴 하드라구요.
근데 상품설명탭 부분에 숫자표시가 처리가 해당 특정상품 페이지에서만 표시가 되고
나머지에서는 안되서
/shop/item.php 를 어떻게 수정해야 할까요?
<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
item.php 165라인~173라인에서 $it_id 대신에 "특정상품코드"로 변경
// 관리자가 확인한 사용후기의 개수를 얻음
$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'];
답변을 작성하시기 전에 로그인 해주세요.