특정 페이지에 판매 중인 모든 상품 출력하기
item_list 를 이용해 특정 페이지에 판매 중인 모든 상품을 출력하는 코드입니다.
[code]
<?php
$list_mod = 3; // 가로 이미지수
$list_row = 1; // 이미지줄 수, Query를 직접 지정하기 때문에 이미지줄 수는 적용되지 않음
$img_width = 230; // 이미지 폭
$img_height = 230; // 이미지 높이
$skin = G5_SHOP_SKIN_PATH.'/main.10.skin.php'; // 스킨
$sql = " select * from {$g5['g5_shop_item_table']} where it_use = '1' order by it_order, it_id desc ";
$list = new item_list($skin, $list_mod, $list_row, $img_width, $img_height);
$list->set_query($sql);
$list->set_view('it_img', true);
$list->set_view('it_id', true);
$list->set_view('it_name', true);
$list->set_view('it_basic', true);
$list->set_view('it_cust_price', true);
$list->set_view('it_price', true);
$list->set_view('it_icon', true);
$list->set_view('sns', true);
echo $list->run();
?>
[/code]
set_query 를 이용해 직접 Query를 지정해주면 판매 중인 모든 상품을 출력할 수 있습니다.
[code]
<?php
$list_mod = 3; // 가로 이미지수
$list_row = 1; // 이미지줄 수, Query를 직접 지정하기 때문에 이미지줄 수는 적용되지 않음
$img_width = 230; // 이미지 폭
$img_height = 230; // 이미지 높이
$skin = G5_SHOP_SKIN_PATH.'/main.10.skin.php'; // 스킨
$sql = " select * from {$g5['g5_shop_item_table']} where it_use = '1' order by it_order, it_id desc ";
$list = new item_list($skin, $list_mod, $list_row, $img_width, $img_height);
$list->set_query($sql);
$list->set_view('it_img', true);
$list->set_view('it_id', true);
$list->set_view('it_name', true);
$list->set_view('it_basic', true);
$list->set_view('it_cust_price', true);
$list->set_view('it_price', true);
$list->set_view('it_icon', true);
$list->set_view('sns', true);
echo $list->run();
?>
[/code]
set_query 를 이용해 직접 Query를 지정해주면 판매 중인 모든 상품을 출력할 수 있습니다.
댓글 6개
sahara
10년 전
좋아유
10년 전
좋은 정보 감사합니다~
9년 전
좋은정보 감사합니다^^
7년 전
좋은 정보 감사드립니다.
qwaszx
4년 전
감사합니다!
Bsori
4년 전
감사합니다.
게시판 목록
영카트5 팁자료실
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 401 |
|
1년 전 | 2323 | |
| 400 |
|
1년 전 | 1381 | |
| 399 | 1년 전 | 2764 | ||
| 398 | 1년 전 | 860 | ||
| 397 |
|
1년 전 | 2737 | |
| 396 | 1년 전 | 1330 | ||
| 395 | 1년 전 | 727 | ||
| 394 | 1년 전 | 446 | ||
| 393 | 1년 전 | 1002 | ||
| 392 |
다케미카코
|
1년 전 | 2644 | |
| 391 |
|
1년 전 | 799 | |
| 390 |
사노라가노라
|
1년 전 | 1044 | |
| 389 | 1년 전 | 497 | ||
| 388 |
|
1년 전 | 85432 | |
| 387 | 1년 전 | 818 | ||
| 386 | 1년 전 | 2514 | ||
| 385 | 1년 전 | 823 | ||
| 384 | 1년 전 | 1842 | ||
| 383 |
|
1년 전 | 1871 | |
| 382 | 2년 전 | 1423 | ||
| 381 | 2년 전 | 2573 | ||
| 380 |
|
2년 전 | 2124 | |
| 379 |
e4uhack
|
2년 전 | 2068 | |
| 378 |
|
2년 전 | 1062 | |
| 377 |
|
2년 전 | 1373 | |
| 376 | 2년 전 | 1203 | ||
| 375 |
|
2년 전 | 2230 | |
| 374 |
페이투페이
|
2년 전 | 1719 | |
| 373 |
|
2년 전 | 1447 | |
| 372 | 2년 전 | 1228 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기