테스트 사이트 - 개발 중인 베타 버전입니다

(초보) 상품 순서를 코드 순이나 등록순으로 변경하고 싶습니다. 채택완료

hyosiklee 7년 전 조회 1,488

상품 순서를 코드 순이나 등록순으로 변경하고 싶습니다.

검색해보니 order by 를 수정하면될거 같은데.. 소스를 다 뒤져도 모르겠네요.

어디를 수정해야할지 조언 부탁드립니다.

 

http://ytm2018.cafe24.com/shop/list.php?ca_id=10

 

 

* list.php

 

if (G5_IS_MOBILE) {     include_once(G5_MSHOP_PATH.'/list.php');     return; }

$sql = " select * from {$g5['g5_shop_category_table']} where ca_id = '$ca_id' and ca_use = '1'  "; $ca = sql_fetch($sql); if (!$ca['ca_id'])     alert('등록된 분류가 없습니다.');

// 테마미리보기 스킨 등의 변수 재설정 if(defined('_THEME_PREVIEW_') && _THEME_PREVIEW_ === true) {     $ca['ca_skin']       = (isset($tconfig['ca_skin']) && $tconfig['ca_skin']) ? $tconfig['ca_skin'] : $ca['ca_skin'];     $ca['ca_img_width']  = (isset($tconfig['ca_img_width']) && $tconfig['ca_img_width']) ? $tconfig['ca_img_width'] : $ca['ca_img_width'];     $ca['ca_img_height'] = (isset($tconfig['ca_img_height']) && $tconfig['ca_img_height']) ? $tconfig['ca_img_height'] : $ca['ca_img_height'];     $ca['ca_list_mod']   = (isset($tconfig['ca_list_mod']) && $tconfig['ca_list_mod']) ? $tconfig['ca_list_mod'] : $ca['ca_list_mod'];     $ca['ca_list_row']   = (isset($tconfig['ca_list_row']) && $tconfig['ca_list_row']) ? $tconfig['ca_list_row'] : $ca['ca_list_row']; }

// 본인인증, 성인인증체크 if(!$is_admin) {     $msg = shop_member_cert_check($ca_id, 'list');     if($msg)         alert($msg, G5_SHOP_URL); }

$g5['title'] = $ca['ca_name'].' 상품리스트';

if ($ca['ca_include_head'])     @include_once($ca['ca_include_head']); else     include_once(G5_SHOP_PATH.'/_head.php');

// 스킨경로 $skin_dir = G5_SHOP_SKIN_PATH;

if($ca['ca_skin_dir']) {     if(preg_match('#^theme/(.+)$#', $ca['ca_skin_dir'], $match))         $skin_dir = G5_THEME_PATH.'/'.G5_SKIN_DIR.'/shop/'.$match[1];     else         $skin_dir = G5_PATH.'/'.G5_SKIN_DIR.'/shop/'.$ca['ca_skin_dir'];

    if(is_dir($skin_dir)) {         $skin_file = $skin_dir.'/'.$ca['ca_skin'];

        if(!is_file($skin_file))             $skin_dir = G5_SHOP_SKIN_PATH;     } else {         $skin_dir = G5_SHOP_SKIN_PATH;     } }

define('G5_SHOP_CSS_URL', str_replace(G5_PATH, G5_URL, $skin_dir));

if ($is_admin)     //echo '

'; ?>

    
        
                                 
        
    
         
        
                                  
        set_category($row[ca_id], 2);                 $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_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();             }             else{                 echo '
'.str_replace(G5_PATH.'/', '', $skin_file).' 파일을 찾을 수 없습니다. 관리자에게 알려주시면 감사하겠습니다.
';             }             ?>        
                

echo "\n\n"; ?>  

 

* list.10.skin.php

 

// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨 add_stylesheet('', 0); ?>

 

댓글을 작성하려면 로그인이 필요합니다.

답변 1개

채택된 답변
+20 포인트
7년 전
로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

h
hyosiklee
7년 전
감사합니다. 리스트 앞쪽에 추가하니까 되네요

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인