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

네이버페이 연동 관련 채택완료

청춘 8년 전 조회 6,508

테스트 계정으로 로그인한 후 장바구니 클릭하면 네이버페이 연동버튼이 아래처럼 보이는데, 상세페이지 화면에서는 네이버페이 버튼이 나타나질 않습니다.(모바일에서도 같은 현상)

 

기본환경 설정에 공통 스크립트 붙여넣기 하고, 환경설정에서 네이버페이 결제설정에

 

네이버페이 가맹점 인증키, 버튼 인증키 삽입, 결제테스트 "예" 설정은 했는데요.

 

별도의 코드 설정을 해줘야만 하는건가요?

 

며칠째 잘 몰라 헤매고 있습니다 ㅠㅠ

 

고수님들의 팁 부탁드립니다

 

테스트 계정은 id: test , pass : test 입니다

 

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

답변 4개

채택된 답변
+20 포인트

 혹시 상세페이지 스킨 사용하셨나요?

basic스킨말고 다른스킨 적용중이시라면 한번 변경해서 해보십시오

장바구니에만 표시되는거보니 커스텀하면서 네이버페이 부분 제외 해놨을수도있습니다. 

로그인 후 평가할 수 있습니다

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

8년 전

food 테마스킨 적용 사용중입니다.

/www/theme/food/shop 하위에는 cart.php 파일과 item.php 파일이 없고, 아래 경로의 파일이 있습니다.

--------------------------------------------------------------------

 

/www/shop/cart.php

 

// 보관기간이 지난 상품 삭제 cart_item_clean();

// cart id 설정 set_cart_id($sw_direct);

$s_cart_id = get_session('ss_cart_id'); // 선택필드 초기화 $sql = " update {$g5['g5_shop_cart_table']} set ct_select = '0' where od_id = '$s_cart_id' "; sql_query($sql);

$cart_action_url = G5_SHOP_URL.'/cartupdate.php';

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

// 테마에 cart.php 있으면 include if(defined('G5_THEME_SHOP_PATH')) {     $theme_cart_file = G5_THEME_SHOP_PATH.'/cart.php';     if(is_file($theme_cart_file)) {         include_once($theme_cart_file);         return;         unset($theme_cart_file);     } }

$g5['title'] = '장바구니'; include_once('./_head.php'); ?>

   

   
                                                                                                                                                       

        // $s_cart_id 로 현재 장바구니 자료 쿼리         $sql = " select a.ct_id,                         a.it_id,                         a.it_name,                         a.ct_price,                         a.ct_point,                         a.ct_qty,                         a.ct_status,                         a.ct_send_cost,                         a.it_sc_type,                         b.ca_id,                         b.ca_id2,                         b.ca_id3                    from {$g5['g5_shop_cart_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id )                   where a.od_id = '$s_cart_id' ";         $sql .= " group by a.it_id ";         $sql .= " order by a.ct_id ";         $result = sql_query($sql);

        $it_send_cost = 0;

        for ($i=0; $row=sql_fetch_array($result); $i++)         {             // 합계금액 계산             $sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price,                             SUM(ct_point * ct_qty) as point,                             SUM(ct_qty) as qty                         from {$g5['g5_shop_cart_table']}                         where it_id = '{$row['it_id']}'                           and od_id = '$s_cart_id' ";             $sum = sql_fetch($sql);

            if ($i==0) { // 계속쇼핑                 $continue_ca_id = $row['ca_id'];             }

            $a1 = '';             $a2 = '';             $image = get_it_image($row['it_id'], 70, 70);

            $it_name = $a1 . stripslashes($row['it_name']) . $a2;             $it_options = print_item_options($row['it_id'], $s_cart_id);             if($it_options) {                 $mod_options = '

';                 $it_name .= '
'.$it_options.'
';             }

            // 배송비             switch($row['ct_send_cost'])             {                 case 1:                     $ct_send_cost = '착불';                     break;                 case 2:                     $ct_send_cost = '무료';                     break;                 default:                     $ct_send_cost = '선불';                     break;             }

            // 조건부무료             if($row['it_sc_type'] == 2) {                 $sendcost = get_item_sendcost($row['it_id'], $sum['price'], $sum['qty'], $s_cart_id);

                if($sendcost == 0)                     $ct_send_cost = '무료';             }

            $point      = $sum['point'];             $sell_price = $sum['price'];         ?>

       

                                                                                                       

       

        if ($i == 0) {             echo '

';         } else {             // 배송비 계산             $send_cost = get_sendcost($s_cart_id, 0);         }         ?>                
상품이미지상품명총수량판매가소계포인트배송비                                            
                                                                                                       
장바구니에 담긴 상품이 없습니다.
   

    0 || $send_cost > 0) {     ?>    

        0) { // 배송비가 0 보다 크다면 (있다면) ?>        
배송비
       
       

        0) {         ?>

       

총계 가격/포인트
       
원 /
       

   

   

   

                쇼핑 계속하기                                         쇼핑 계속하기                                        
                   

   

 

-----------------------------------------------------------------------

 

★ www/shop/item.php

 

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

$it_id = trim($_GET['it_id']);

include_once(G5_LIB_PATH.'/iteminfo.lib.php');

// 분류사용, 상품사용하는 상품의 정보를 얻음 $sql = " select a.*, b.ca_name, b.ca_use from {$g5['g5_shop_item_table']} a, {$g5['g5_shop_category_table']} b where a.it_id = '$it_id' and a.ca_id = b.ca_id "; $it = sql_fetch($sql); if (!$it['it_id'])     alert('자료가 없습니다.'); if (!($it['ca_use'] && $it['it_use'])) {     if (!$is_admin)         alert('현재 판매가능한 상품이 아닙니다.'); }

// 분류 테이블에서 분류 상단, 하단 코드를 얻음 $sql = " select ca_skin_dir, ca_include_head, ca_include_tail, ca_cert_use, ca_adult_use from {$g5['g5_shop_category_table']} where ca_id = '{$it['ca_id']}' "; $ca = sql_fetch($sql);

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

// 오늘 본 상품 저장 시작 // tv 는 today view 약자 $saved = false; $tv_idx = (int)get_session("ss_tv_idx"); if ($tv_idx > 0) {     for ($i=1; $i<=$tv_idx; $i++) {         if (get_session("ss_tv[$i]") == $it_id) {             $saved = true;             break;         }     } }

if (!$saved) {     $tv_idx++;     set_session("ss_tv_idx", $tv_idx);     set_session("ss_tv[$tv_idx]", $it_id); } // 오늘 본 상품 저장 끝

// 조회수 증가 if (get_cookie('ck_it_id') != $it_id) {     sql_query(" update {$g5['g5_shop_item_table']} set it_hit = it_hit + 1 where it_id = '$it_id' "); // 1증가     set_cookie("ck_it_id", $it_id, 3600); // 1시간동안 저장 }

// 스킨경로 $skin_dir = G5_SHOP_SKIN_PATH; $ca_dir_check = true;

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

    if(is_dir($skin_dir)) {         $form_skin_file = $skin_dir.'/item.form.skin.php';

        if(is_file($form_skin_file))             $ca_dir_check = false;     } }

if($ca_dir_check) {     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)) {             $form_skin_file = $skin_dir.'/item.form.skin.php';

            if(!is_file($form_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));

$g5['title'] = $it['it_name'].' > '.$it['ca_name'];

// 분류 상단 코드가 있으면 출력하고 없으면 기본 상단 코드 출력 if ($ca['ca_include_head'])     @include_once($ca['ca_include_head']); else     include_once(G5_SHOP_PATH.'/_head.php');

// 분류 위치 // HOME > 1단계 > 2단계 ... > 6단계 분류 $ca_id = $it['ca_id']; $nav_skin = $skin_dir.'/navigation.skin.php'; if(!is_file($nav_skin))     $nav_skin = G5_SHOP_SKIN_PATH.'/navigation.skin.php'; include $nav_skin;

// 이 분류에 속한 하위분류 출력 $cate_skin = $skin_dir.'/listcategory.skin.php'; if(!is_file($cate_skin))     $cate_skin = G5_SHOP_SKIN_PATH.'/listcategory.skin.php'; include $cate_skin;

if ($is_admin) {     echo '

'; } ?>

'.conv_content($it['it_head_html'], 1).'

';

// 보안서버경로 if (G5_HTTPS_DOMAIN)     $action_url = G5_HTTPS_DOMAIN.'/'.G5_SHOP_DIR.'/cartupdate.php'; else     $action_url = './cartupdate.php';

// 이전 상품보기 $sql = " select it_id, it_name from {$g5['g5_shop_item_table']} where it_id > '$it_id' and SUBSTRING(ca_id,1,4) = '".substr($it['ca_id'],0,4)."' and it_use = '1' order by it_id asc limit 1 "; $row = sql_fetch($sql); if ($row['it_id']) {     $prev_title = '이전상품 '.$row['it_name'].'';     $prev_href = '';     $prev_href2 = ''.PHP_EOL; } else {     $prev_title = '';     $prev_href = '';     $prev_href2 = ''; }

// 다음 상품보기 $sql = " select it_id, it_name from {$g5['g5_shop_item_table']} where it_id < '$it_id' and SUBSTRING(ca_id,1,4) = '".substr($it['ca_id'],0,4)."' and it_use = '1' order by it_id desc limit 1 "; $row = sql_fetch($sql); if ($row['it_id']) {     $next_title = '다음 상품 '.$row['it_name'].'';     $next_href = '';     $next_href2 = ''.PHP_EOL; } else {     $next_title = '';     $next_href = '';     $next_href2 = ''; }

// 고객선호도 별점수 $star_score = get_star_image($it['it_id']);

// 관리자가 확인한 사용후기의 개수를 얻음 $sql = " select count(*) as cnt from `{$g5['g5_shop_item_use_table']}` where it_id = '{$it_id}' and is_confirm = '1' "; $row = sql_fetch($sql); $item_use_count = $row['cnt'];

// 상품문의의 개수를 얻음 $sql = " select count(*) as cnt from `{$g5['g5_shop_item_qa_table']}` where it_id = '{$it_id}' "; $row = sql_fetch($sql); $item_qa_count = $row['cnt'];

// 관련상품의 개수를 얻음 if($default['de_rel_list_use']) {     $sql = " select count(*) as cnt from {$g5['g5_shop_item_relation_table']} a left join {$g5['g5_shop_item_table']} b on (a.it_id2=b.it_id) where a.it_id = '{$it['it_id']}' and  b.it_use='1' ";     $row = sql_fetch($sql);     $item_relation_count = $row['cnt']; }

// 소셜 관련 $sns_title = get_text($it['it_name']).' | '.get_text($config['cf_title']); $sns_url  = G5_SHOP_URL.'/item.php?it_id='.$it['it_id']; $sns_share_links .= get_sns_share_link('facebook', $sns_url, $sns_title, G5_SHOP_SKIN_URL.'/img/sns_fb_s.png').' '; $sns_share_links .= get_sns_share_link('twitter', $sns_url, $sns_title, G5_SHOP_SKIN_URL.'/img/sns_twt_s.png').' '; $sns_share_links .= get_sns_share_link('googleplus', $sns_url, $sns_title, G5_SHOP_SKIN_URL.'/img/sns_goo_s.png');

// 상품품절체크 if(G5_SOLDOUT_CHECK)     $is_soldout = is_soldout($it['it_id']);

// 주문가능체크 $is_orderable = true; if(!$it['it_use'] || $it['it_tel_inq'] || $is_soldout)     $is_orderable = false;

if($is_orderable) {     // 선택 옵션     $option_item = get_item_options($it['it_id'], $it['it_option_subject']);

    // 추가 옵션     $supply_item = get_item_supply($it['it_id'], $it['it_supply_subject']);

    // 상품 선택옵션 수     $option_count = 0;     if($it['it_option_subject']) {         $temp = explode(',', $it['it_option_subject']);         $option_count = count($temp);     }

    // 상품 추가옵션 수     $supply_count = 0;     if($it['it_supply_subject']) {         $temp = explode(',', $it['it_supply_subject']);         $supply_count = count($temp);     } }

function pg_anchor($anc_id) {     global $default;     global $item_use_count, $item_qa_count, $item_relation_count; ?>    

include_once(G5_SHOP_PATH.'/settle_naverpay.inc.php'); ?>

   

   

 

로그인 후 평가할 수 있습니다

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

k
8년 전

cart.php 소스 말고 

item.php 소스에 네이버페이 소스 가 있는지 확인해보세요

로그인 후 평가할 수 있습니다

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

최고관리자가 아니래요 그냥 의뢰요청해보는게 어떨까요? 
로그인 후 평가할 수 있습니다

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

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

로그인