메인화면에서 더보기 클릭시 페이지 이동이 아닌 상품이 더보여줬으면 좋겠는데.... 채택완료
ajax를 이용해서 할려고 코드를 짰는데 잘안되네요..
버튼부분
ajax 부분
if (G5_IS_MOBILE) { include_once(G5_MSHOP_PATH.'/listtype.php'); return; }
$type = preg_replace("/[\<\>\'\"\\\'\\\"\%\=\(\)\s]/", "", $_REQUEST['type']); if ($type == 1) $g5['title'] = $deit_type[1]; else if ($type == 2) $g5['title'] = $deit_type[2]; else if ($type == 3) $g5['title'] = $deit_type[3]; else if ($type == 4) $g5['title'] = $deit_type[4]; else if ($type == 5) $g5['title'] = $deit_type[5]; else if ($type == 6) $g5['title'] = $deit_type[6]; else if ($type == 7) $g5['title'] = $deit_type[7]; else if ($type == 8) $g5['title'] = $deit_type[8]; else if ($type == 9) $g5['title'] = $deit_type[9]; else if ($type == 10) $g5['title'] = $deit_type[10]; else alert('상품유형이 아닙니다.');
include_once('./_head.php');
// 한페이지에 출력하는 이미지수 = $list_mod * $list_row $list_mod = 3; // 한줄에 이미지 몇개씩 출력? $list_row = 5; // 한 페이지에 몇라인씩 출력?
$img_width = 230; // 출력이미지 폭 $img_height = 230; // 출력이미지 높이 ?>
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 '
답변을 작성하려면 로그인이 필요합니다.
로그인