특정 페이지에 판매 중인 모든 상품 출력하기
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 팁자료실
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 371 |
이로홀딩스
|
2년 전 | 1548 | |
| 370 |
페이투페이
|
2년 전 | 1553 | |
| 369 | 2년 전 | 1302 | ||
| 368 | 2년 전 | 1715 | ||
| 367 | 2년 전 | 2056 | ||
| 366 | 2년 전 | 2269 | ||
| 365 | 2년 전 | 2074 | ||
| 364 | 2년 전 | 1601 | ||
| 363 | 2년 전 | 1346 | ||
| 362 | 3년 전 | 3116 | ||
| 361 | 3년 전 | 1917 | ||
| 360 |
|
3년 전 | 2670 | |
| 359 | 3년 전 | 2424 | ||
| 358 | 3년 전 | 1584 | ||
| 357 |
welcome
|
3년 전 | 1318 | |
| 356 | 3년 전 | 1629 | ||
| 355 | 3년 전 | 1891 | ||
| 354 | 3년 전 | 1558 | ||
| 353 | 3년 전 | 1268 | ||
| 352 | 3년 전 | 1318 | ||
| 351 | 3년 전 | 1424 | ||
| 350 | 3년 전 | 2513 | ||
| 349 | 3년 전 | 1671 | ||
| 348 | 3년 전 | 3271 | ||
| 347 | 3년 전 | 4069 | ||
| 346 | 4년 전 | 2821 | ||
| 345 | 4년 전 | 4489 | ||
| 344 |
별지기천사
|
4년 전 | 3986 | |
| 343 | 4년 전 | 3409 | ||
| 342 | 4년 전 | 2023 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기