메인상품 진열시 할인률 표시 방법

메인상품 진열시 할인률 표시 방법

QA

메인상품 진열시 할인률 표시 방법

본문

아직 실력이 마니 부족하여 이것저것 해봤는데 오류가 나서 도움을 받고자 질문 올렵니다..

영카트 5 설치 하고..

http://sir.kr/yc5_theme/82  테마를 설치 해서 만드는 중인데여

http://sir.kr/yc5_skin/41?page=3 이 스킨처럼 메인페이지 출력시 할인률을 표시하게 하고자 합니다..

 

테마는 반응형이고    스킨이 비반응형이라 그런지...적용을 하면 비반응형으로 바뀌게 되어서

문제가 생기는데여ㅛ...어찌 해야 하는건지...ㅡ,ㅡ.

 

아래는 테마의 원본 파일입니다

<!-- 상품진열 10 시작 { -->
<?php
for ($i=1; $row=sql_fetch_array($result); $i++) {
    if ($this->list_mod >= 2) { // 1줄 이미지 : 2개 이상
        if ($i%$this->list_mod == 0) $sct_last = 'sct_last'; // 줄 마지막
        else if ($i%$this->list_mod == 1) $sct_last = 'sct_clear'; // 줄 첫번째
        else $sct_last = '';
    } else { // 1줄 이미지 : 1개
        $sct_last = 'sct_clear';
    }

    if ($i == 1) {
        if ($this->css) {
            echo "<ul class=\"{$this->css}\">\n";
        } else {
            echo "<ul class=\"sct sct_10\">\n";
        }
    }

    echo "<li class=\"sct_li col-md-3 col-sm-6 col-xs-6  {$sct_last}\">\n";

    echo "<div class=\"sct_li_pannel\">\n";

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

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

    if ($this->href) {
        echo "</a></div>\n";
    }


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

    if ($this->view_it_name) {
        echo stripslashes($row['it_name'])."\n";
    }

    if ($this->href) {
        echo "</a></div>\n";
    }

    if ($this->view_it_price) {

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

        if ($this->view_it_price) {
            echo display_price(get_price($row), $row['it_tel_inq'])."\n";
        }

        echo "</div>\n";

    }

    if ($this->view_it_basic) {
        echo "<div class=\"sct_basic\">".stripslashes($row['it_basic'])."</div>\n";
    }

    echo "<div class=\"sct_wish\"><button type=\"button\" class=\"btn_wish\" data-it_id=\"{$row['it_id']}\">위시</button><span>".number_format(get_wish_count($row['it_id']))."</span></div>\n";

    echo "</div>\n";

    echo "</li>\n";
}

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

if($i == 1) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\n";
?>
<!-- } 상품진열 10 끝 -->

 

 

 

여기부터는  할인률이 적용이된 스킨 파일입니다..

 

<style>

/* ---스타일시트 리셋 --- */
 @import url("http://fonts.googleapis.com/earlyaccess/nanumgothic.css");
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary,
time, mark, audio, video, input  {
    margin: 0;
    padding: 0;
    border: none;
    outline: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}

html, body, form, fieldset, p, div, h1, h2, h3, h4, h5, h6 {
    -webkit-text-size-adjust: none;
}

article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
    display: block;
}

body {

    font-family: NanumGothic, 'Nanum Gothic';
}

ol, ul {
    list-style: none;
}

blockquote, q {
    quotes: none;
}

blockquote:before, blockquote:after, q:before, q:after {
    content: '';
    content: none;
}

ins {
    text-decoration: none;
}

del {
    text-decoration: line-through;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}


/*--defult_layout--*/
body{_text-align:center;}

 

#contaner{ padding-left: 25px; padding-right: 25px; padding-bottom: 25px; padding-top: 10px; width:1000px; margin:0 auto ; background: #fff;  margin-top:20px; border:1px solid #eee;  }
#contaner .content{width:1000px; margin:0 auto; border: 0px solid #000; _text-align:left; background: #fff; position:relative;}
#contaner .items li{float: left; background: #fff; width: 281px; height: 400px; border: 1px solid #d6d6d6; margin: 10px; padding: 15px;}
#contaner .items li:hover{border: 1px solid #00a3e0; cursor: hand;}
#contaner .goods{position: relative;}
#contaner .icon{width:38px; height: 46px; border: 0px solid #000; position: absolute; top:0px; left: 15px; background:url(/shop/vr_skin/vr_img/icon.png) 0px -190;}
#contaner .icon_info{width:60px; height: 20px; border: 0px solid #000; position: absolute; top:313px; right: 6px; background:url(/shop/vr_skin/vr_img/icon.png) -400px 2;}
#contaner .item_title{height:60px;}
#contaner .item_name { position: absolute; top:315px; left: 15px; font-size: 14px; color: #999999;}
#contaner .item_icon{position: absolute; top:7px; left:13px; }
#contaner .item_txt{position: absolute; top:30px; left:15px; width:200px; font-size: 18px; font-weight: bold;}
#contaner .item{position: absolute; top:17px; right:20px; text-decoration: none;  color: #a3a3a3;  font-size: 15px;}

price{position: relative; height: 40px;}
#contaner .sale {position: absolute;  top:40px; margin:0px; padding:0px; font-weight: bold; font-size: 34px; color: #ff0544; letter-spacing: -2px;}
#contaner .org_price{position: absolute; top:42px; left:85px; margin:0px; padding:0px; font-size: 13px; text-decoration: line-through; color: #b8b8b8;}
#contaner .sale_price{position: absolute; top:55px; left:85px; margin:0px; padding:0px; font-weight: bold;font-size: 17px;}
#contaner .review_box{position: absolute; top:395px; left: 15px;  margin:0px; padding:0px;border-top:1px solid #ccc;  height:32px; width:281px;}
#contaner .review_box:after{display:block;clear:both;content:''}
#contaner .review{float: left;  border:0px solid #000; width: 140px; text-align: center; height: 32px; line-height: 32px; font-size: 13px;}
#contaner .qna{float: left;  border:0px solid #000; width: 140px; text-align: center; height: 32px; line-height: 32px; font-size: 13px;}

</style>

<div id="contaner">
 <ul class="items">

<!-- 상품진열 10 시작 { -->
<?php


for ($i=1; $row=sql_fetch_array($result); $i++) {
 $a=$row[it_id];

 

// 상품후기 개수를 얻음
$sql3 = " select count(*) as cnt from `{$g5['g5_shop_item_use_table']}` where it_id = '$a' ";
$row3 = sql_fetch($sql3);
$item_use_count = $row3['cnt'];

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

 

 

 

 

?>

<!--item_1-->
     <li class="goods">
      
      <div class="item_img">
<a href="<?=$this->href;?><?=$row['it_id'];?>">
<?=get_it_image($row['it_id'], $this->img_width, $this->img_height, '', '', stripslashes($row['it_name']))."\n";?> </a>


</div>
      <div>
        <p class="item_name"><a href="<?=$this->href;?><?=$row['it_id'];?>"><?=$row['it_name'];?></a></p>
        <p class="icon_info"><?=item_icon($row)?></p>
        <p class="price">
         <span class="sale"> <?= floor(($row['it_cust_price']-$row['it_price'])/$row['it_cust_price']*100) ?>%</span>
            <span class="org_price"><?=$row['it_cust_price'];?>원 </span>
            <span class="sale_price"><?=$row['it_price'];?>원 </span>
           
        </p>
       
      </div>
      
      <div class="icon"> </div>
      <div class="review_box">
        
          <div class="review">상품후기(<?=$item_use_count?>)</div>
          <div class="qna">상품문의(<?=$item_qa_count?>)</div>
        
       
      </div>
     </li>
     <!--//item_1-->


   <?
    

}

 

 

 


if($i == 1) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\n";
?>
<!-- } 상품진열 10 끝 -->

</ul>
</div>

 

테마 원본 파일에 할인률 표시되며 반응형 페이지로 작동 될수 있도록

수정 부탁 드립니다.. 

이 질문에 댓글 쓰기 :

답변을 작성하시기 전에 로그인 해주세요.
전체 6
QA 내용 검색
  • 개별 목록 구성 제목 답변작성자조회작성일
  • 질문이 없습니다.

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT