그누보드5.4.8 버전에서 영카트 사용하려면 초기 설정 어떻게 해야 할까요?
본문
그누보드5.4.8 버전 이용중인데
그누보드5.4.6 버전 이후부터 그누보드5와 영카트5가 함께 통합된것으로 알고 있습니다.
그동안 그누보드5만 사용하다
영카트 기능도 사용을 해보려고 접속을 하려는데 페이지가 뜨지가 않는데요.
abc.com/shop/index.php로 접속을 하면 영카트 메인이 뜨는것인가 싶어 했더니
페이지가 작동하지 않습니다.
500 에러가 뜨는데 검색해도 잘 나오지 않아서 설정을 어떻게 해줘야 하는지 모르겠네요.ㅠㅠ
아래 소스는 index.php 파일입니다.
<?php
include_once('./_common.php');
if(defined('G5_THEME_PATH')) {
require_once(G5_THEME_SHOP_PATH.'/index.php');
return;
}
if (G5_IS_MOBILE) {
include_once(G5_MSHOP_PATH.'/index.php');
return;
}
define("_INDEX_", TRUE);
include_once(G5_SHOP_PATH.'/shop.head.php');
?>
<!-- 메인이미지 시작 { -->
<?php echo display_banner('메인', 'mainbanner.10.skin.php'); ?>
<!-- } 메인이미지 끝 -->
<?php if($default['de_type1_list_use']) { ?>
<!-- 히트상품 시작 { -->
<section id="idx_hit" class="sct_wrap">
<header>
<h2><a href="<?php echo shop_type_url('1'); ?>">히트상품</a></h2>
</header>
<?php
$list = new item_list();
$list->set_type(1);
$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);
$list->set_view('star', true);
echo $list->run();
?>
</section>
<!-- } 히트상품 끝 -->
<script>
//히트상품
$(function(){
var hit_smt_val = parseInt($('#idx_hit .smt_40').attr("data-value"));
if(! hit_smt_val){
hit_smt_val = 5;
}
$('#idx_hit .smt_40').owlCarousel({
loop:true,
nav:true,
autoplay:true,
autoplayHoverPause:true,
responsive:{
1000:{items:5}
}
})
});
</script>
<?php } ?>
<?php if($default['de_type3_list_use']) { ?>
<!-- 최신상품 시작 { -->
<section class="sct_wrap">
<header>
<h2><a href="<?php echo shop_type_url('3'); ?>">최신상품</a></h2>
</header>
<?php
$list = new item_list();
$list->set_type(3);
$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);
$list->set_view('star', true);
echo $list->run();
?>
</section>
<!-- } 최신상품 끝 -->
<?php } ?>
<?php if($default['de_type2_list_use']) { ?>
<!-- 추천상품 시작 { -->
<section class="sct_wrap">
<header>
<h2><a href="<?php echo shop_type_url('2'); ?>">추천상품</a></h2>
</header>
<?php
$list = new item_list();
$list->set_type(2);
$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);
$list->set_view('star', true);
echo $list->run();
?>
</section>
<!-- } 추천상품 끝 -->
<?php } ?>
<?php include_once(G5_SHOP_SKIN_PATH.'/boxevent.skin.php'); // 이벤트 ?>
<?php if($default['de_type5_list_use']) { ?>
<!-- 할인상품 시작 { -->
<section class="sct_wrap">
<header>
<h2><a href="<?php echo shop_type_url('5'); ?>">할인상품</a></h2>
</header>
<?php
$list = new item_list();
$list->set_type(5);
$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);
$list->set_view('star', true);
echo $list->run();
?>
</section>
<!-- } 할인상품 끝 -->
<?php } ?>
<?php
include_once(G5_SHOP_PATH.'/shop.tail.php');
답변 2
★ shop/ 디렉터리가 존재하지 않아, 500 에러가 발생했을 가능성 있음
PHP 버전이 7.x 이상인지 (php -v 명령어 사용) 체크.
.htaccess 파일에서 Options -Indexes 설정이 있는지 확인하고,
php.ini에서 display_errors 설정을 활성화한 뒤
오류 메시지를 확인하면 보다 정확한 원인을 파악할 수 있습니다.
점검 단계로는
1) 데이터베이스 연결 설정,
2) 테이블 생성 확인,
3) 환경 설정 및 테마 적용,
4) 상품 등록 및 결제 설정,
5) 테스트 및 디버깅.
config.php에서 DB 연결 정보를 설정한 후
/install/gnuboard5shop.sql을 실행하여 테이블을 생성하고,
/adm/config_form.php에서 환경 설정을 완료.
이후 G5_THEME_SHOP_PATH 및 G5_SHOP_SKIN_PATH를 확인하여
올바른 테마가 적용되었는지 점검하고, /shop_admin/에서 상품 및 카테고리를 등록.
첨부하신 index.php 파일에서는
G5_THEME_SHOP_PATH, G5_SHOP_PATH의 올바른 경로를 확인하고,
G5_IS_MOBILE이 참일 경우 G5_MSHOP_PATH.'/index.php'가 정상적으로 로드되는지 점검.
또한 display_banner('메인', 'mainbanner.10.skin.php')가 올바르게 동작하는지,
$default['de_type1_list_use'] 등 설정값이 존재하는지 isset()을 사용하여 확인.
JavaScript에서 owlCarousel 초기화 시 data-value가 정의되지 않으면
NaN 오류가 발생할 수 있으니 기본값을 설정, boxevent.skin.php 파일이 존재하는지도 체크.
※ 프로젝트에 영카트(shop/ 디렉터리)가 설치되어 있지 않다면,
1) 영카트 파일을 추가 및 복사,
2) 데이터베이스 테이블 추가,
3) config.php 설정 수정,
4) 관리자 페이지에서 환경 설정 완료,
5) 퍼미션 및 캐시 삭제 후 테스트 과정을 거쳐야 합니다
영카트 관련소스를 버전에 맞춰 적용하신건가요?
500에러는 소스단에 오류가 나는거라
오류 표기하도록 해서 디버깅해서 체크해 보셔야 합니다.