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

상품카테고리 누른 후 상품 리스트 페이지에서 상품 유형아이콘 노출 채택완료

qoqofh 4년 전 조회 1,007

상품카테고리 누른 후 상품 리스트 페이지에서 상품 유형아이콘 노출을 하려고 하는데, 

 

어느 파일을 건드려야 하는지 이해가 안가서요 ㅠㅠ 

 

고수님들의 답변 부탁드립니다 ㅠ

 

</p>

<p><?php

if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가</p>

<p>// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨

add_stylesheet('<link rel="stylesheet" href="'.G5_MSHOP_SKIN_URL.'/style.css">', 0);

?></p>

<p><?php if(!defined('G5_IS_SHOP_AJAX_LIST') && $config['cf_kakao_js_apikey']) { ?>

<script src="<a href="https://developers.kakao.com/sdk/js/kakao.min.js"></script>" target="_blank" rel="noopener noreferrer">https://developers.kakao.com/sdk/js/kakao.min.js"></script></a>

<script src="<?php echo G5_JS_URL; ?>/kakaolink.js"></script>

<script>

    // 사용할 앱의 Javascript 키를 설정해 주세요.

    Kakao.init("<?php echo $config['cf_kakao_js_apikey']; ?>");

</script>

<?php } ?></p>

<p><!-- 메인상품진열 10 시작 { -->

<?php

$is_gallery_list = ($this->ca_id && isset($_COOKIE['ck_itemlist'.$this->ca_id.'_type'])) ? $_COOKIE['ck_itemlist'.$this->ca_id.'_type'] : '';

if(!$is_gallery_list){

    $is_gallery_list = 'gallery';

}

$li_width = ($is_gallery_list === 'gallery') ? intval(100 / $this->list_mod) : 100;

$li_width_style = ' style="width:'.$li_width.'%;"';

$ul_sct_class = ($is_gallery_list === 'gallery') ? 'sct_30' : 'sct_20';</p>

<p>for ($i=0; $row=sql_fetch_array($result); $i++) {

    if ($i == 0) {

        if ($this->css) {

            echo "<ul id=\"sct_wrap\" class=\"{$this->css}\">\n";

        } else {

            echo "<ul id=\"sct_wrap\" class=\"sct ".$ul_sct_class."\">\n";

        }

    }</p>

<p>    if($i % $this->list_mod == 0)

        $li_clear = ' sct_clear';

    else

        $li_clear = '';</p>

<p>    echo "<li class=\"sct_li{$li_clear}\"><div class=\"li_wr is_view_type_list\">\n";</p>

<p>    if ($this->href) {

        echo "<div class=\"sct_img\"><a href=\"{$this->href}{$row['it_id']}\">\n";

    }</p>

<p>    if ($this->view_it_img) {

        echo get_it_image($row['it_id'], $this->img_width, $this->img_height, '', '', stripslashes($row['it_name']))."\n";

    }</p>

<p>    if ($this->href) {

        echo "</a></div>\n";

    }</p>

<p>

    if ($this->view_it_id) {

        echo "<div class=\"sct_id\"><".stripslashes($row['it_id'])."></div>\n";

    }</p>

<p>    if ($this->href) {

        echo "<div class=\"sct_txt\"><a href=\"{$this->href}{$row['it_id']}\" class=\"sct_a\">\n";

    }</p>

<p>    if ($this->view_it_name) {

        echo stripslashes($row['it_name'])."\n";

    }</p>

<p>    if ($this->href) {

        echo "</a></div>\n";

    }</p>

<p>    //if ($this->view_it_price) {

    //    echo "<div class=\"sct_cost\">\n";

    //    echo display_price(get_price($row), $row['it_tel_inq'])."\n";

    //    echo "</div>\n";

    //}

    

    if ($this->view_it_cust_price || $this->view_it_price) {</p>

<p>        echo "<div class=\"sct_cost\">\n";</p>

<p>        if ($this->view_it_cust_price && $row['it_cust_price']) {

            echo "<strike style='color:#eee;'>".display_price($row['it_cust_price'])."</strike> -> \n";

        }</p>

<p>        if ($this->view_it_price) {

            echo display_price(get_price($row), $row['it_tel_inq'])."\n";

        }</p>

<p>        echo "</div>\n";</p>

<p>    }

    </p>

<p>    if ($this->view_sns) {

        $sns_top = $this->img_height + 10;

        $sns_url  = G5_SHOP_URL.'/item.php?it_id='.$row['it_id'];

        $sns_title = get_text($row['it_name']).' | '.get_text($config['cf_title']);

        echo "<div class=\"sct_sns\" style=\"top:{$sns_top}px\">";

        echo get_sns_share_link('facebook', $sns_url, $sns_title, G5_MSHOP_SKIN_URL.'/img/facebook.png');

        echo get_sns_share_link('twitter', $sns_url, $sns_title, G5_MSHOP_SKIN_URL.'/img/twitter.png');

        echo get_sns_share_link('googleplus', $sns_url, $sns_title, G5_MSHOP_SKIN_URL.'/img/gplus.png');

        echo get_sns_share_link('kakaotalk', $sns_url, $sns_title, G5_MSHOP_SKIN_URL.'/img/sns_kakao.png');

        echo "</div>\n";

    }</p>

<p>    echo "</div></li>\n";

}</p>

<p>if ($i > 0) echo "</ul>\n";</p>

<p>if($i == 0) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\n";

?>

<!-- } 상품진열 10 끝 --></p>

<p><?php if( !defined('G5_IS_SHOP_AJAX_LIST') ) { ?>

<script>

jQuery(function($){

    var li_width = "<?php echo intval(100 / $this->list_mod); ?>",

        img_width = "<?php echo $this->img_width; ?>",

        img_height = "<?php echo $this->img_height; ?>",

        list_ca_id = "<?php echo $this->ca_id; ?>";</p>

<p>    function shop_list_type_fn(type){

        var $ul_sct = $("ul.sct");</p>

<p>        if(type == "gallery") {

            $ul_sct.removeClass("sct_20").addClass("sct_30")

            .find(".sct_li").attr({"style":"width:"+li_width+"%"});

        } else {

            $ul_sct.removeClass("sct_30").addClass("sct_20")

            .find(".sct_li").removeAttr("style");

        }

        

        if (typeof g5_cookie_domain != 'undefined') {

            set_cookie("ck_itemlist"+list_ca_id+"_type", type, 1, g5_cookie_domain);

        }

    }</p>

<p>    $("button.sct_lst_view").on("click", function() {

        var $ul_sct = $("ul.sct");</p>

<p>        if($(this).hasClass("sct_lst_gallery")) {

            shop_list_type_fn("gallery");

        } else {

            shop_list_type_fn("list");

        }

    });

});

</script>

<?php } ?></p>

<p>

 

이소스를 건드려야할듯 한데 위치를 모르겠습니다 ㅠ

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

답변 1개

채택된 답변
+20 포인트
Big1
4년 전

메인에서 상품출력인가요?

https://github.com/gnuboard/youngcart5/blob/5.4.5.1/theme/basic/shop/index.php#L33

먼저 it_icon true 로 되어있나 보시고요 

없으면 삽입

 

https://github.com/gnuboard/youngcart5/blob/master/theme/basic/skin/shop/basic/main.20.skin.php#L110

여기서부터 3줄 복붙하시면 될듯

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

답변에 대한 댓글 2개

q
qoqofh
4년 전
아 메인페이지쪽이아니구 ㅎㅎ 상품 카테고리 눌렀을 때 나오는 페이지요 ㅎ

shop/list.php?ca_id=

이부분요 ㅎㅎ
q
qoqofh
4년 전
메인페이지는 정상적으로 잘 노출 되는데, 상품 리스트 페이지에서는 안나ㅗㅇ네요 ㅠㅠ

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

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

로그인