테스트 사이트 - 개발 중인 베타 버전입니다

상세페이지에서 두가지 질문입니다

· 12년 전 · 36 · 2
1.상세페이지에서 사용후기 간략하게 추가로 뽑으려면

2.메인의 히트상품 추천상품 인기상품등을 상세페이지 일부분에 추가하려면 어떻게 해야 하나요
메인소스 복사해서 넣으니까 안나오던데요




상세페이지에서 본래 사용후기 말고
사진나오는데 옆에 추가로 간략하게 후기 3개정도 나오게 하고싶은데요
어디를 수정해야 하나요

이런 소스가 있던데 이건 최신후기뽑는 소스라서
해당상품 사용후기 간략하게 뽑을려면 어떻게 해야 하나요


<?
$sql = "select * from $g4[yc4_item_ps_table] where is_confirm = 1 order by is_id desc limit 5 ";
$result = mysql_query($sql) or die(mysql_error());
for($i=0 ; $row=mysql_fetch_array($result); $i++)
{
$sql2 = " select * from $g4[yc4_item_table] where it_id = '$row[it_id]' ";
$row2 = sql_fetch($sql2);
$sql3 = " select * from $g4[member_table] where mb_id = '$row[mb_id]' ";
$row3 = sql_fetch($sql3);
$star = get_star($row[is_score]);
echo "<tr><td width=50><img src='./data/item/$row[it_id]_s' width=40>";

echo "<td><b>$row2[it_name]</b><br>
<a href='$g4[shop_path]/item.php?it_id=$row[it_id]'><font color=#3366cc>".cut_str($row[is_subject],30,"...")."</font></a></td>";
echo "<td align=right>$row3[mb_name]<br><img src='$cart_skin/star{$star}.gif' border=0></td>";
echo "</tr><tr><td height=1 bgcolor=#cfcfcf colspan=3</td></tr>";
}
?> </td>
</tr>
<tr>
<td colspan="2" class="itam_n2"> 관련상품</td>
</tr>
<tr>
<td height="2" colspan="2" background='<?=$g4[shop_img_path]?>/double_line.gif'></td>
</tr>
<tr>
<td colspan="2" align="center"><?
$list_mod = $default[de_rel_list_mod];
$img_width = $default[de_rel_img_width];
$img_height = $default[de_rel_img_height];
$td_width = (int)(100 / $list_mod);

$sql = " select b.*
from $g4[yc4_item_relation_table] a
left join $g4[yc4_item_table] b on (a.it_id2=b.it_id)
where a.it_id = '$it[it_id]'
and b.it_use='1' ";
$result = sql_query($sql);
$num = @mysql_num_rows($result);
if ($num)
include "$g4[shop_path]/maintype14.inc.php";
else
echo 관련 상품이 없습니다";
?>

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

댓글 2개

1. 레이아웃을 바꾸는 문의에 대한 답변은 어렵습니다.

shop/itemuse.inc.php 의 아래 부분의 코드를 적당한 곳에 복사해 넣어주시기 바랍니다.

<table width=100% cellpadding=0 cellspacing=0 border=0>
<tr>
<td width=11><img src='<?=$g4[shop_img_path]?>/corner01.gif'></td>
<td valign=top>
<table width=100% height=31 cellpadding=0 cellspacing=0 border=0>
<tr align=center>
<td width=40 background='<?=$g4[shop_img_path]?>/box_bg01.gif'>번호</td>
<td background='<?=$g4[shop_img_path]?>/box_bg01.gif'>제목</td>
<td width=80 background='<?=$g4[shop_img_path]?>/box_bg01.gif'>작성자</td>
<td width=100 background='<?=$g4[shop_img_path]?>/box_bg01.gif'>작성일</td>
<td width=80 background='<?=$g4[shop_img_path]?>/box_bg01.gif'>평가점수</td>
</tr>
</table></td>
<td width=11><img src='<?=$g4[shop_img_path]?>/corner02.gif'></td>
</tr>
<?
$sql_common = " from $g4[yc4_item_ps_table] where it_id = '$it[it_id]' and is_confirm = '1' ";
... 중략 ...
}
?>
<tr>
<td width=11><img src='<?=$g4[shop_img_path]?>/corner03.gif'></td>
<td width=100% background='<?=$g4[shop_img_path]?>/box_bg04.gif'></td>
<td width=11><img src='<?=$g4[shop_img_path]?>/corner04.gif'></td>
</tr>
</table>




2.

<?
$type = 1; // 히트상품
display_type($type, $default["de_type{$type}_list_skin"], $default["de_type{$type}_list_mod"], $default["de_type{$type}_list_row"], $default["de_type{$type}_img_width"], $default["de_type{$type}_img_height"]);
?>

이런 코드를 상세페이지의 적당한 곳에 넣어주시기 바랍니다.
12년 전
후기는 본래의 삼품평 페이지 같은데요
본래 상품후기 페이지는 그냥 두고

간략한게 최신글처럼 해당상품평 뽑아오려고요
http://www.hyundaihmall.com/front/shItemDetailR.do?ItemCode=2015542108&BasketSectID=141253 페이지처럼요

총상품평(00개)
------------------
.상품제목1 작성자
.상품평제목2 작성자
.상품평제목3 작성자
------------------

아니면 최신 상품평만 1개 추출한더가..

어렵다면 itemuse.inc.php라는걸 복사해서
itemuse.inc.php수정해 itemuse2.inc.php만들어봐야할듯

게시글 목록

번호 제목
56073
56067
56065
56060
56058
56055
56051
56048
56044
56043
56042
56039
56035
56032
56030
56028
56025
56018
56012
56010