메인에 노출되는 최신상품
본문
상품을 등록할때 신상품에 체크를 해야만 메인에 노출이 되니요?
최근에 올린상품이 신상품란에 자동으로 노출이 되게 하는 방법은 없나요?
답변 2
그렇게 만들수야 있겠지만 현재는 체크한 품목을 추출해오도록 되어있고
그런 기능이 들어잇지않습니다
같은이유로 난감했는데요.
개념상 억지로 가능합니다.
/shop_admin/configform.php
관리자 > 쇼핑몰 초기화면
히트상품...
....
할인상품... 밑에
등록순상품출력을 추가하고
/shop_admin/configformupdate.php 파일에서
de_type6_list_use = '$de_type6_list_use',
de_type6_img_height = '$de_type6_img_height',
de_type6_list_mod = '$de_type6_list_mod',
de_type6_list_row = '$de_type6_list_row',
de_type6_img_width = '$de_type6_img_width',
de_type6_img_height = '$de_type6_img_height',
필드를 추가하고
g5_shop_default 테이블에서 위필드를 생성하구요.
g5_shop_item 테이블에서 it_type6 필드를 추가하고 기본값을 1로 지정해줍니다.
/shop/index.php 파일에서
<!-- 최신상품 시작 { -->
<!-- } 최신상품 끝 -->
<header>
<h2><a href="<?php echo G5_SHOP_URL; ?>/listtype.php?type=6">최신상품</a></h2>
<p class="sct_wrap_hdesc"><?php echo $config['cf_title']; ?> 최신상품 모음</p>
</header>
<?php
$list = new item_list();
$list->set_type(6);
$list->set_view('it_img', true);
$list->set_view('it_id', true);
$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();
?>
</section>
<!-- } 최신상품 끝 -->
넣으시면 끝~~~~~