it_use_cnt 는 어디에서 업데이트 되나요??

it_use_cnt 는 어디에서 업데이트 되나요??

QA

it_use_cnt 는 어디에서 업데이트 되나요??

답변 1

본문

shop > itemuseformupdate.php 파일에서 확인하니 없더라구요??

상품별 it_use_cnt 이 후기가 작성이 되면 하나씩 카운트 되어서 업데이트가 되어야 할텐데

이는 어떤 파일에서 행해질까요??

이 질문에 댓글 쓰기 :

답변 1

itemuseformupdate.php 파일에 보면 아래 코드가 있는데

 

//쇼핑몰 설정에서 사용후기가 즉시 출력일 경우
if( ! $default['de_item_use_use'] ){
    update_use_cnt($it_id);
    update_use_avg($it_id);
}

 

update_use_cnt 함수에서 업데이트 되네요.

 

lib/shop.lib.php 파일 참고..

 

// 사용후기의 확인된 건수를 상품테이블에 저장합니다.
function update_use_cnt($it_id)
{
    global $g5;
    $row = sql_fetch(" select count(*) as cnt from {$g5['g5_shop_item_use_table']} where it_id = '{$it_id}' and is_confirm = 1 ");
    return sql_query(" update {$g5['g5_shop_item_table']} set it_use_cnt = '{$row['cnt']}' where it_id = '{$it_id}' ");
}

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 0
© SIRSOFT
현재 페이지 제일 처음으로