영카트5를 쥐마켓? 처럼 구현중에 있습니다.
상품관리 권한중에서 상품등록을 판매자한테 일정부분 줘서 판매자가 상품관리에서 상품등록을 해서
전체 상품 리스트를 출력해서 유저들이 볼 수 있게까지 구현했습니다.
근데 이제 판매자 자기가 올렸던 상품들만 자기 페이지에서 리스트업 하려고 하는데 이게 잘 안돼네요 ..
<?php
// 상품 출력순서가 있다면
if ($sort != "")
$order_by = $sort.' '.$sortodr.' , it_order, it_id desc';
else
$order_by = 'it_order, it_id desc';
// 리스트 스킨
$skin_file = $skin_dir.'/'.$ca['ca_skin'];
if (file_exists($skin_file)) {
// 총몇개 = 한줄에 몇개 * 몇줄
$items = $ca['ca_list_mod'] * $ca['ca_list_row'];
// 페이지가 없으면 첫 페이지 (1 페이지)
if ($page < 1) $page = 1;
// 시작 레코드 구함
$from_record = ($page - 1) * $items;
$list = new item_list($skin_file, $ca['ca_list_mod'], $ca['ca_list_row'], $ca['ca_img_width'], $ca['ca_img_height']);
$list->set_category($ca['ca_id'], 1);
$list->set_category($ca['ca_id'], 2);
$list->set_category($ca['ca_id'], 3);
$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_1', true);
$list->set_view('it_basic', true);
$list->set_view('it_price', true);
echo $list->run();
// where 된 전체 상품수
$total_count = $list->total_count;
// 전체 페이지 계산
$total_page = ceil($total_count / $items);
}
else
{
echo '<div class="sct_nofile">'.str_replace(G5_PATH.'/', '', $skin_file).' 파일을 찾을 수 없습니다.<br>관리자에게 알려주시면 감사하겠습니다.</div>';
}
?>
이 코드를 잘 요리해서 마이페이지에 올린다음에 자기가 쓴글만 리스트업 하려고하는데 잘안돼네요 ㅠㅠ
$order_by 변수에 들어가는 값을 조작하거나 php class item_list를 어떻게 조작해야 하겠는데 ..ㅠㅠ 알려주시면 감사하겠습니다.
답변 3개
답변을 작성하려면 로그인이 필요합니다.