Search...
영카트 모든 상품 보는 방법
설명 :
shop/all_list.php 경로를 만들어준다. (파일생성)
php
<?php
include_once('./_common.php');
$g5['title'] = '전체 상품 목록';
include_once('./_head.php');
// 한페이지에 출력하는 이미지수 = $list_mod * $list_row
$list_mod = 4; // 1줄당 이미지 수
$list_row = 3; // 출력할 줄 수
$img_width = 230; // 이미지 폭
$img_height = 230; // 이미지 높이
?>
<?php
$list_file = G5_SHOP_SKIN_PATH.'/list.10.skin.php'; // 스킨
if (file_exists($list_file)) {
// 총몇개 = 한줄에 몇개 * 몇줄
$items = $list_mod * $list_row;
// 페이지가 없으면 첫 페이지 (1 페이지)
if ($page < 1) $page = 1;
// 시작 레코드 구함
$from_record = ($page - 1) * $items;
$sql = " select * from {$g5['g5_shop_item_table']} where it_use = '1' order by it_order, it_id desc ";
$list->set_query($sql);
$list = new item_list();
$list->set_list_skin($list_file);
$list->set_list_mod($list_mod);
$list->set_list_row($list_row);
$list->set_img_size($img_width, $img_height);
$list->set_is_page(true);
$list->set_from_record($from_record);
$list->set_view('it_img', true);
$list->set_view('it_id', false);
$list->set_view('it_name', true);
$list->set_view('it_basic', true);
$list->set_view('it_cust_price', false);
$list->set_view('it_price', true);
$list->set_view('it_icon', true);
$list->set_view('sns', true);
echo $list->run();
// where 된 전체 상품수
$total_count = $list->total_count;
// 전체 페이지 계산
$total_page = ceil($total_count / $items);
}
?>
<?php
echo get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr&page=");
?>
<?php
include_once('./_tail.php');
?>
여기서 스킨만 list.10.skin.php만 복제해서 새로 만든다.
list.all.skin.php 이라고 만든다.
그러고 위에 소스를 보면 스킨을 위치만 변경하면 된다.