답변 3개
채택된 답변
+20 포인트
8년 전
</p><p style="font-size: 14.6667px;"> </p><p style="font-size: 14.6667px;">function wish_icon($it)</p><p style="font-size: 14.6667px;">{</p><p style="font-size: 14.6667px;"> global $g5;</p><p style="font-size: 14.6667px;"> </p><p style="font-size: 14.6667px;"> $icon = '<span class="sit_icon">';</p><p style="font-size: 14.6667px;"> </p><p style="font-size: 14.6667px;"> // 위쉬</p><p style="font-size: 14.6667px;"> $sql = " select a.wi_id, a.wi_time, b.* from {$g5['g5_shop_wish_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id ) where a.mb_id = '{$member['mb_id']}' order by a.wi_id desc";</p><p style="font-size: 14.6667px;"> </p><p style="font-size: 14.6667px;"> $row = sql_fetch($sql);</p><p style="font-size: 14.6667px;"> if($row['it_id'])</p><p style="font-size: 14.6667px;"> $icon .= '<img src="'.G5_THEME_IMG_URL.'/.png" alt="위쉬상품아이콘">';</p><p style="font-size: 14.6667px;"> </p><p style="font-size: 14.6667px;"> $icon .= '</span>';</p><p style="font-size: 14.6667px;"> </p><p style="font-size: 14.6667px;"> return $icon;</p><p style="font-size: 14.6667px;">}</p><p style="font-size: 14.6667px;"> </p><p style="font-size: 14.6667px;">
만들어봤는데 아무튼 해보진않았어요.
로그인 후 평가할 수 있습니다
답변에 대한 댓글 6개
�
블랑숑
8년 전
<?php echo wish_icon($list[$i]); ?>
�
블랑숑
8년 전
동작은 안하네요 else로 반대상황 줘보니 모두 표시가 되는데 ㅠㅠ
�
딸기케익
8년 전
wish_icon($it)인거 같아요.
�
블랑숑
8년 전
음 그문제가 아니라 뭔가 잘못된거 같아요 방금 해봤는데 안돼요 ㅠㅠ
�
딸기케익
8년 전
if($row['it_id']) {
var_dump $row;
}
위와 같은 식으로 어디서 값을 못받는지 찾아보시면 되요.
크롬이면 f12누르고 네트워크쪽 봐도 대충알 수 있어요.
이제 퇴근해서 집이고.. 저도 고수는 아닌지라.. 아무튼 해결하길바래요.
var_dump $row;
}
위와 같은 식으로 어디서 값을 못받는지 찾아보시면 되요.
크롬이면 f12누르고 네트워크쪽 봐도 대충알 수 있어요.
이제 퇴근해서 집이고.. 저도 고수는 아닌지라.. 아무튼 해결하길바래요.
�
블랑숑
8년 전
네^^ 도와주셔서 너무너무 감사합니다 복 받으세요~!
댓글을 작성하려면 로그인이 필요합니다.
8년 전
위시리스트에 많은 상품을 담아놓는 것은 아니므로 리스트 출력시 판단하도록 하면 되겠습니다
1. 리스트 스킨에서 적당한 곳에 추가 후
$qq=sql_query("select wi_id from {$g5['g5_shop_wish_table']} where mb_id = '{$member['mb_id']}' ");
$wishArr=array();
while($row=sql_fetch_array($qq)) $wishArr[]=$row[wr_id];
2. 출력할 곳에서
if( in_array($row['it_id'], $wishArr)) echo "<위시>";
로그인 후 평가할 수 있습니다
답변에 대한 댓글 2개
�
블랑숑
8년 전
해봤는데 위시리스트에 하나라도 들어가 있으면 전상품에 다 뜨네요 ㅠㅠ
�
균이
8년 전
아이쿠 죄송 wr_id가 몸에 베여버려서리.... 오류입니다
아래처럼 수정하세요
select wi_id --> select it_id
$wishArr[]=$row[wr_id];--> $wishArr[]=$row[it_id];
아래처럼 수정하세요
select wi_id --> select it_id
$wishArr[]=$row[wr_id];--> $wishArr[]=$row[it_id];
댓글을 작성하려면 로그인이 필요합니다.
8년 전
함수는 없구요..lib에 추가해야됩니다.
</p><p> </p><p>select a.wi_id, a.wi_time, b.* from {$g5['g5_shop_wish_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id )<span style="font-size: 11pt;"> where a.mb_id = '{$member['mb_id']}' order by a.wi_id desc</span></p><p><span style="font-size: 11pt;"> </span></p><p><span style="font-size: 11pt;">
위에는 리스트뽑는 쿼리고요. 함수는 고수분들이 답변해주실거에요.
로그인 후 평가할 수 있습니다
답변에 대한 댓글 1개
�
블랑숑
8년 전
ㅜㅜ
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인