영카트 5.4 버전 내용 적용
This commit is contained in:
@ -5,12 +5,20 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
add_stylesheet('<link rel="stylesheet" href="'.G5_SHOP_SKIN_URL.'/style.css">', 0);
|
||||
|
||||
// 관련상품 스킨은 사품을 한줄에 하나만 표시하며 해당 상품에 관련상품이 등록되어 있는 경우 기본으로 7개까지 노출합니다.
|
||||
add_javascript('<script src="'.G5_THEME_JS_URL.'/theme.shop.list.js"></script>', 10);
|
||||
?>
|
||||
|
||||
<!-- 상품진열 40 시작 { -->
|
||||
<?php
|
||||
for ($i=1; $row=sql_fetch_array($result); $i++) {
|
||||
$href = G5_SHOP_URL.'/item.php?it_id='.$row['it_id'];
|
||||
$i=0;
|
||||
foreach((array) $list as $row){
|
||||
|
||||
if( empty($row) ) continue;
|
||||
$i++;
|
||||
|
||||
$item_link_href = shop_item_url($row['it_id']);
|
||||
$star_score = $row['it_use_avg'] ? (int) get_star($row['it_use_avg']) : '';
|
||||
|
||||
if ($list_mod >= 2) { // 1줄 이미지 : 2개 이상
|
||||
if ($i%$list_mod == 0) $sct_last = ' sct_last'; // 줄 마지막
|
||||
else if ($i%$list_mod == 1) $sct_last = ' sct_clear'; // 줄 첫번째
|
||||
@ -23,23 +31,16 @@ for ($i=1; $row=sql_fetch_array($result); $i++) {
|
||||
if ($this->css) {
|
||||
echo "<ul class=\"{$this->css}\">\n";
|
||||
} else {
|
||||
echo "<ul class=\"smt smt_40\">\n";
|
||||
echo "<ul class=\"smt smt_10\">\n";
|
||||
}
|
||||
}
|
||||
|
||||
$list_top_pad = 20;
|
||||
$list_right_pad = 20;
|
||||
$list_bottom_pad = 20;
|
||||
$list_left_pad = $this->img_width + 20;
|
||||
$list_height = $this->img_height + 2;
|
||||
|
||||
echo "<li class=\"sct_li{$sct_last}\" style=\"padding:{$list_top_pad}px {$list_right_pad}px {$list_bottom_pad}px {$list_left_pad}px;width:{$list_width}px;height:{$list_height}px\">\n";
|
||||
|
||||
echo "<li class=\"sct_li{$sct_last}\">\n";
|
||||
|
||||
echo "<div class=\"sct_img\">\n";
|
||||
|
||||
if ($this->href) {
|
||||
echo "<a href=\"{$this->href}{$row['it_id']}\">\n";
|
||||
echo "<a href=\"{$item_link_href}\">\n";
|
||||
}
|
||||
|
||||
if ($this->view_it_img) {
|
||||
@ -50,26 +51,33 @@ for ($i=1; $row=sql_fetch_array($result); $i++) {
|
||||
echo "</a>\n";
|
||||
}
|
||||
|
||||
|
||||
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\">";
|
||||
echo get_sns_share_link('facebook', $sns_url, $sns_title, G5_SHOP_SKIN_URL.'/img/facebook.png');
|
||||
echo get_sns_share_link('twitter', $sns_url, $sns_title, G5_SHOP_SKIN_URL.'/img/twitter.png');
|
||||
echo get_sns_share_link('googleplus', $sns_url, $sns_title, G5_SHOP_SKIN_URL.'/img/gplus.png');
|
||||
echo "</div>\n";
|
||||
echo "<div class=\"sct_btn\">
|
||||
<button type=\"button\" class=\"btn_cart sct_cart\" data-it_id=\"{$row['it_id']}\"><i class=\"fa fa-shopping-cart\" aria-hidden=\"true\"></i> 장바구니</button>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
echo "<div class=\"cart-layer\"></div>\n";
|
||||
|
||||
if ($this->view_it_icon) {
|
||||
// 품절
|
||||
if (is_soldout($row['it_id'], true)) {
|
||||
echo '<span class="shop_icon_soldout"><span class="soldout_txt">SOLD OUT</span></span>';
|
||||
}
|
||||
}
|
||||
|
||||
echo "</div>\n";
|
||||
|
||||
echo "<div class=\"sct_ct_wrap\">\n";
|
||||
|
||||
// 사용후기 평점표시
|
||||
if ($this->view_star && $star_score) {
|
||||
echo "<div class=\"sct_star\"><span class=\"sound_only\">고객평점</span><img src=\"".G5_SHOP_URL."/img/s_star".$star_score.".png\" alt=\"별점 ".$star_score."점\" class=\"sit_star\"></div>\n";
|
||||
}
|
||||
|
||||
if ($this->view_it_id) {
|
||||
echo "<div class=\"sct_id\"><".stripslashes($row['it_id'])."></div>\n";
|
||||
}
|
||||
|
||||
if ($this->href) {
|
||||
echo "<div class=\"sct_txt\"><a href=\"{$this->href}{$row['it_id']}\">\n";
|
||||
echo "<div class=\"sct_txt\"><a href=\"{$item_link_href}\">\n";
|
||||
}
|
||||
|
||||
if ($this->view_it_name) {
|
||||
@ -79,37 +87,66 @@ for ($i=1; $row=sql_fetch_array($result); $i++) {
|
||||
if ($this->href) {
|
||||
echo "</a></div>\n";
|
||||
}
|
||||
|
||||
if ($this->view_it_basic && $row['it_basic']) {
|
||||
|
||||
if ($this->view_it_basic && $row['it_basic']) {
|
||||
echo "<div class=\"sct_basic\">".stripslashes($row['it_basic'])."</div>\n";
|
||||
}
|
||||
|
||||
if ($this->view_it_cust_price || $this->view_it_price) {
|
||||
|
||||
echo "<div class=\"sct_cost\">\n";
|
||||
|
||||
if ($this->view_it_cust_price && $row['it_cust_price']) {
|
||||
echo "<span class=\"sct_discount\">".display_price($row['it_cust_price'])."</span>\n";
|
||||
}
|
||||
|
||||
if ($this->view_it_price) {
|
||||
echo display_price(get_price($row), $row['it_tel_inq'])."\n";
|
||||
}
|
||||
|
||||
echo "</div>\n";
|
||||
|
||||
}
|
||||
|
||||
if ($this->view_it_icon) {
|
||||
echo "<div class=\"sct_icon\">".item_icon($row)."</div>\n";
|
||||
|
||||
|
||||
// 위시리스트 + 공유 버튼 시작 {
|
||||
echo "<div class=\"sct_op_btn\">\n";
|
||||
echo "<button type=\"button\" class=\"btn_wish\" data-it_id=\"{$row['it_id']}\"><span class=\"sound_only\">위시리스트</span><i class=\"fa fa-heart-o\" aria-hidden=\"true\"></i></button>\n";
|
||||
echo "<button type=\"button\" class=\"btn_share\"><span class=\"sound_only\">공유하기</span><i class=\"fa fa-share-alt\" aria-hidden=\"true\"></i></button>\n";
|
||||
|
||||
echo "<div class=\"sct_sns_wrap\">";
|
||||
if ($this->view_sns) {
|
||||
$sns_top = $this->img_height + 10;
|
||||
$sns_url = $item_link_href;
|
||||
$sns_title = get_text($row['it_name']).' | '.get_text($config['cf_title']);
|
||||
echo "<div class=\"sct_sns\">";
|
||||
echo "<h3>SNS 공유</h3>";
|
||||
echo get_sns_share_link('facebook', $sns_url, $sns_title, G5_SHOP_SKIN_URL.'/img/facebook.png');
|
||||
echo get_sns_share_link('twitter', $sns_url, $sns_title, G5_SHOP_SKIN_URL.'/img/twitter.png');
|
||||
echo get_sns_share_link('googleplus', $sns_url, $sns_title, G5_SHOP_SKIN_URL.'/img/gplus.png');
|
||||
echo "<button type=\"button\" class=\"sct_sns_cls\"><span class=\"sound_only\">닫기</span><i class=\"fa fa-times\" aria-hidden=\"true\"></i></button>";
|
||||
echo "</div>\n";
|
||||
}
|
||||
echo "<div class=\"sct_sns_bg\"></div>";
|
||||
echo "</div></div>\n";
|
||||
// } 위시리스트 + 공유 버튼 끝
|
||||
|
||||
|
||||
echo "</div>\n";
|
||||
|
||||
if ($this->view_it_icon) {
|
||||
echo "<div class=\"sit_icon_li\">".item_icon($row)."</div>\n";
|
||||
}
|
||||
|
||||
echo "</li>\n";
|
||||
}
|
||||
|
||||
if ($i > 1) echo "</ul>\n";
|
||||
if ($i >= 1) echo "</ul>\n";
|
||||
|
||||
if($i == 1) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\n";
|
||||
if($i == 0) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\n";
|
||||
?>
|
||||
<!-- } 상품진열13 끝 -->
|
||||
<!-- } 상품진열40 끝 -->
|
||||
|
||||
<script>
|
||||
//SNS 공유
|
||||
$(function (){
|
||||
$(".btn_share").on("click", function() {
|
||||
$(this).parent("div").children(".sct_sns_wrap").show();
|
||||
});
|
||||
$('.sct_sns_bg, .sct_sns_cls').click(function(){
|
||||
$('.sct_sns_wrap').hide();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user