영카트4에서는 관리자님이
상품타입별로 별도페이지 구성하는 팁을 주셨었는데.. 유용하게 사용해왔습니다.
영카트5용으로 바꿔서 만들어보려는데 잘 되지 않습니다. 괜찮으시면 부탁드립니다..
|
답변 1개
채택된 답변
+20 포인트
2014-09-05 (금) 09:54:39
shop/listtype.php 파일의 코드를 수정하시면 됩니다. 예를 들면 아래와 같습니다.
Copy
<?phpinclude_once('./_common.php'); $type = 2; // 타입지정if ($type == 1) $g5['title'] = '히트상품';else if ($type == 2) $g5['title'] = '추천상품';else if ($type == 3) $g5['title'] = '최신상품';else if ($type == 4) $g5['title'] = '인기상품';else if ($type == 5) $g5['title'] = '할인상품';else alert('상품유형이 아닙니다.'); include_once('./_head.php'); // 한페이지에 출력하는 이미지수 = $list_mod * $list_row$list_mod = 3; // 한줄에 이미지 몇개씩 출력?$list_row = 5; // 한 페이지에 몇라인씩 출력? $img_width = 230; // 출력이미지 폭$img_height = 230; // 출력이미지 높이?> <?php// 상품 출력순서가 있다면$order_by = ' it_order, it_id desc ';if ($sort != '') $order_by = $sort.' '.$sortodr.' , it_order, it_id desc';else $order_by = 'it_order, it_id desc'; if (!$skin) $skin = 'list.10.skin.php'; define('G5_SHOP_CSS_URL', G5_SHOP_SKIN_URL); // 리스트 유형별로 출력$list_file = G5_SHOP_SKIN_PATH.'/'.$skin;if (file_exists($list_file)) { // 총몇개 = 한줄에 몇개 * 몇줄 $items = $list_mod * $list_row; // 페이지가 없으면 첫 페이지 (1 페이지) if ($page < 1) $page = 1; // 시작 레코드 구함 $from_record = ($page - 1) * $items; $list = new item_list(); $list->set_type($type); $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_order_by($order_by); $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_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);}else{ echo '<div align="center">'.$skin.' 파일을 찾을 수 없습니다.<br>관리자에게 알려주시면 감사하겠습니다.</div>';}?> <?php$qstr .= '&type='.$type.'&sort='.$sort;echo get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page=");?> <?phpinclude_once('./_tail.php');?>
답변을 작성하려면 로그인이 필요합니다.