영카트 모바일 상품리스트에서 베스트쪽부분을 랜덤으로 노출가능한가요? 채택완료
영카트 모바일 상품리스트에서 베스트쪽부분을 랜덤으로 노출가능한가요?
메인쪽에서는 가능한데
리스트쪽에서는 수정하려고하는데...
/mobile/shop/list.php
$list = new item_list($best_skin, $list_mod, $list_row, $ca['ca_mobile_img_width'], $ca['ca_mobile_img_height']);
$list->set_query($sql);
$list->set_mobile(true);
$list->set_view('it_img', true);
$list->set_view('it_id', false);
$list->set_view('it_name', true);
$list->set_view('it_price', true);
$list->set_order_by('rand()'); <-- 이코드를 추가해도 랜덤으로 나오질 않습니다ㅠ
echo $list->run();
답변 2개
참고 http://gnustudy.com/bbs/board.php?bo_table=yc_tip&wr_id=131
mobile/shop/list.php 파일에서 베스트 상품 뽑아오는 쿼리가 좀 더 위에 있을 겁니다.
거기에서 직접 변경하세요.
$sql = " select *
from {$g5['g5_shop_item_table']}
where ( ca_id like '$ca_id%' or ca_id2 like '$ca_id%' or ca_id3 like '$ca_id%' )
and it_use = '1'
and it_type4 = '1'
order by rand()
limit 0, $limit ";
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인