영카트 5.4 버전 내용 적용

This commit is contained in:
thisgun
2019-12-02 10:29:31 +09:00
parent 8517e1e31e
commit 9b0078350d
840 changed files with 36442 additions and 28088 deletions

View File

@ -3,6 +3,9 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.G5_MSHOP_SKIN_URL.'/style.css">', 0);
// 장바구니 또는 위시리스트 ajax 스크립트
add_javascript('<script src="'.G5_JS_URL.'/shop.list.action.js"></script>', 10);
?>
<?php if(!defined('G5_IS_SHOP_AJAX_LIST') && $config['cf_kakao_js_apikey']) { ?>
@ -22,9 +25,15 @@ if(!$is_gallery_list){
}
$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_10' : 'sct_20';
$ul_sct_class = ($is_gallery_list === 'gallery') ? 'sct_10' : 'sct_10_list';
$i = 0;
foreach((array) $list as $row){
if( empty($row) ) continue;
$item_link_href = shop_item_url($row['it_id']); // 상품링크
$star_score = $row['it_use_avg'] ? (int) get_star($row['it_use_avg']) : ''; //사용자후기 평균별점
for ($i=0; $row=sql_fetch_array($result); $i++) {
if ($i == 0) {
if ($this->css) {
echo "<ul id=\"sct_wrap\" class=\"{$this->css}\">\n";
@ -33,7 +42,8 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
}
}
if($i % $this->list_mod == 0)
if($i % $this->list_mod == 0)
$li_clear = ' sct_clear';
else
$li_clear = '';
@ -41,7 +51,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
echo "<li class=\"sct_li{$li_clear}\"$li_width_style><div class=\"li_wr is_view_type_list\">\n";
if ($this->href) {
echo "<div class=\"sct_img\"><a href=\"{$this->href}{$row['it_id']}\">\n";
echo "<div class=\"sct_img\"><a href=\"{$item_link_href}\">\n";
}
if ($this->view_it_img) {
@ -52,13 +62,17 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
echo "</a></div>\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\">&lt;".stripslashes($row['it_id'])."&gt;</div>\n";
}
if ($this->href) {
echo "<div class=\"sct_txt\"><a href=\"{$this->href}{$row['it_id']}\" class=\"sct_a\">\n";
echo "<div class=\"sct_txt\"><a href=\"{$item_link_href}\" class=\"sct_a\">\n";
}
if ($this->view_it_name) {
@ -69,25 +83,48 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
echo "</a></div>\n";
}
if ($this->view_it_basic && $row['it_basic']) {
echo "<div class=\"sct_basic\">".stripslashes($row['it_basic'])."</div>\n";
}
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_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 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";
if ($this->view_sns) {
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>\n";
}
echo "</div>\n";
// } 위시리스트 + 공유 버튼 끝
echo "</div></li>\n";
echo "</div>\n";
if ($this->view_it_icon) {
echo "<div class=\"sct_icon\">".item_icon($row)."</div>\n";
}
echo "</li>\n";
$i++;
}
if ($i > 0) echo "</ul>\n";
@ -108,10 +145,10 @@ jQuery(function($){
var $ul_sct = $("ul.sct");
if(type == "gallery") {
$ul_sct.removeClass("sct_20").addClass("sct_10")
$ul_sct.removeClass("sct_10_list").addClass("sct_10")
.find(".sct_li").attr({"style":"width:"+li_width+"%"});
} else {
$ul_sct.removeClass("sct_10").addClass("sct_20")
$ul_sct.removeClass("sct_10").addClass("sct_10_list")
.find(".sct_li").removeAttr("style");
}
@ -129,6 +166,14 @@ jQuery(function($){
shop_list_type_fn("list");
}
});
//SNS 공유
$(document).on("click", ".btn_share", function(e) {
$(this).parent("div").children(".sct_sns_wrap").show();
})
.on("click", ".sct_sns_bg, .sct_sns_cls", function(e) {
$('.sct_sns_wrap').hide();
});
});
</script>
<?php } ?>