';
if ( prd.cpUseYn!="Y" ) {
if ( price[1] === '00' && price[2] != price[3] || price[1] != '00' ) {
html += ' 기ì¤ê° ';
html += ' ' + fnComma(price[2]) + ' ì ';
} else {
if (price[1] == '00') {
html += '
';
if ($('#secAppYn').val() == 'N' && $('#secIosYn').val() == 'N') {
if (prd.goodsDetailVo.webCpAllDcAmt > 0) {
html += '
ì¿ í° ì ì© ììê° ';
} else if (price[1] != '00') {
html += '
'+titPrice+' ';
} else if (price[2] == price[3]) { // KDP-70897 [FO][B2C][B2B2C]ì¬ì´í¸ ë³ ê°ê²© ë
¸ì¶ ê¸°ì¤ ìì (PF/PD)
html += '
기ì¤ê° ';
} else {
html += '
íìê° ';
}
} else {
html += '
ì¿ í° ì ì© ììê° ';
}
html += '
';
if ($('#secAppYn').val() == 'N' && $('#secIosYn').val() == 'N' ) {
if (prd.goodsDetailVo.webCpAllDcAmt > 0) {
html += ' ' + fnComma((price[price.length - 1] - prd.goodsDetailVo.webCpAllDcAmt)) + ' ì ';
} else if (price[1] != '00') {
html += ' ' + fnComma(price[4]) + ' ì ';
} else if (price[2] == price[3]) { // KDP-70897 [FO][B2C][B2B2C]ì¬ì´í¸ ë³ ê°ê²© ë
¸ì¶ ê¸°ì¤ ìì (PF/PD)
html += ' ' + fnComma(price[2]) + ' ì ';
} else {
html += ' ' + fnComma(price[3]) + ' ì ';
}
} else {
html += ' ' + fnComma( (price[price.length-1] - prd.goodsDetailVo.cpAllDcAmt) ) + ' ì ';
}
html += ' í´í보기(ë ì´ì´ì´ë¦¼) ';
} else if ( prd.cpUseYn != "Y" && price[1] != '00') {
html += '
';
html += '
';
html += '
'+titPrice+' ';
html += '
';
html += ' ' + fnComma(price[4]) + ' ì ';
html += ' í´í보기(ë ì´ì´ì´ë¦¼) ';
} else if ( prd.cpUseYn != "Y" && price[1] == '00' && price[1] === '00' && price[2] != price[3] || price[1] != '00' ) {
html += '
';
html += '
';
html += '
íìê° ';
html += '
';
html += '
' + fnComma(price[3]) + ' ì ';
html += '
í´í보기(ë ì´ì´ì´ë¦¼) ';
}
html += ' ';
html += '
';
html += '
';
if (prd.cpUseYn!='Y') {
html += ' 기ì¤ê° ' + fnComma(price[2]) + 'ì ';
if (price[1] == '00') {
html += ' íìê° ' + fnComma(price[3]) + 'ì
';
} else {
if (prd.outletFlgYn != 'Y') {
html += ' '+titPrice+' ' + fnComma(price[4]) + 'ì
';
} else {
html += ' '+titPrice+' ' + fnComma(price[4]) + 'ì
';
}
}
} else {
html += ' 기ì¤ê° ' + fnComma(price[2]) + 'ì ';
if ($('#secAppYn').val() != 'N' || $('#secIosYn').val() != 'N' || prd.goodsDetailVo.webCpAllDcAmt > 0) {
if (price[1] == '00') {
html += ' íìê° ' + fnComma(price[3]) + 'ì ';
} else {
if (prd.outletFlgYn != 'Y') {
html += ' ' + titPrice + ' ' + fnComma(price[4]) + 'ì ';
} else if (prd.outletFlgYn == 'Y') {
html += ' ' + titPrice + ' ' + fnComma(price[4]) + 'ì ';
}
}
}
html += ' ';
if ($('#secAppYn').val() == 'N' && $('#secIosYn').val() == 'N' ) {
if (prd.goodsDetailVo.webCpAllDcAmt > 0) {
html += ' ì¿ í° ì ì© ììê° '+fnComma( (price[price.length-1] - prd.goodsDetailVo.webCpAllDcAmt) )+'ì
';
} else if(price[1] == '00') {
html += ' íìê° '+ fnComma(price[3]) +'ì
';
} else {
html += ' '+titPrice+' '+ fnComma(price[4]) +'ì
';
}
if (prd.goodsDetailVo.totCompVal > 0 ) {
html += ' ì± ì¿ í° ì ì© ì '+fnComma(prd.goodsDetailVo.totCompVal)+'ì ì¶ê° í ì¸
';
}
} else {
html += ' ì¿ í° ì ì© ììê° '+fnComma( (price[price.length-1] - prd.goodsDetailVo.cpAllDcAmt) )+'ì
';
}
html += ' ';
}
html += ' ';
html += '
';
html += ' ';
if (prd.cpUseYn=="Y" || ( prd.cpUseYn != "Y" && price[1] == '00' && price[1] === '00' && price[2] != price[3] || price[1] != '00' )
|| prd.cpUseYn != "Y" && price[1] != '00' ) {
html += '
';
}
html += '
';
}
html += '
';
html += '
';
}
return html;
}
function htmlProductBtn(prd) {
var contextPath = "/sec/";
var prdLink = '/sec/' + prd.goodsDetailUrl;
if($('#aiscCtgYn').val() == 'Y'){
prdLink += "?advPdYn=N";
}
var loginLink = '/sec/' + 'member/indexLogin/';
var homefitnessLink = '/sec/' + 'xhr/homefitness/programNew/?Vod';
var stGbCd = '10';
var isLogin = isLoginCheck;
var html = '';
var btnCd = ''; // 10: 구매í기(주문/ê²°ì ), 11: ì¡°í©íì¬ êµ¬ë§¤í기, 12:ëìì¸í기(ìíìì± ì»¤ì¤í
ìí ì¬ë¶Y) ,20: ì¬ì
ê³ ì림(ìì¸), 21: ì¬ì
ê³ ì림(ë¡ê·¸ì¸), 30: ìì¸í 보기, 00: í매ì¢
ë£(ìì§ì몰(기íì 몰)_ì²´íë¨ë§ì©)
var restockStYn = 'Y';
var stId = '1';
// 구매í기
if (stGbCd === '10') {
if (prd.saleStatCd === '12') {
if(prd.customGoodsYn === 'Y' || prd.customGoodsYn === 'D'){
btnCd = '12';
}else{
if(prd.bspkGoodsYn === 'Y' || prd.goodsAddTpCd === '30') {
btnCd = '11';
} else if ('Y' === prd.goodsMdlExcpt.pfPricePointExcptYn) {
btnCd = '30';
} else if ('Y' === prd.activatePhoneYn) {
btnCd = '13';
} else {
btnCd = '10';
}
}
} else if (prd.saleStatCd === '13') {
if (prd.dlvrPckYn == 'Y' && prd.omsSendYn == 'N') {
btnCd = '10';
} else {
if (restockStYn === 'Y') {
btnCd = '20';
} else {
btnCd = '30';
}
}
} else if (['14', '15'].indexOf(prd.saleStatCd) > -1) {
btnCd = '30';
} else if (['16', '17'].indexOf(prd.saleStatCd) > -1) {
if ('Y' == restockStYn && 'Y' == prd.goodsMdlExcpt.restockGoodsYn) {
btnCd = '20';
}
btnCd = '30';
}
if(prd.mdlCode == 'SM-F926NZUYKOO' || prd.mdlCode == 'SM-F711NZUYKOO' || prd.mdlCode == 'SM-F916NZKAKOO' || prd.mdlCode == 'SM-F721NAWZKOO' || prd.mdlCode == 'SM-F946NAKZKOO'){
btnCd = '30';
}
} else if (['20', '30'].indexOf(stGbCd) > -1) {
if (prd.saleStatCd === '12') {
if(prd.bspkGoodsYn === 'Y' || prd.goodsAddTpCd === '30'){
btnCd = '11';
} else {
btnCd = '10';
}
} else if (prd.saleStatCd === '13') {
if (restockStYn === 'Y') {
btnCd = '20';
} else {
btnCd = '30';
}
} else if (prd.saleStatCd === '17') {
btnCd = '30'; // 미í매 ìì¸í 보기 ì¶ê°(10/05)
}
} else if (stGbCd === '40') {
if (prd.saleStatCd === '12') {
if(prd.bspkGoodsYn === 'Y' || prd.goodsAddTpCd === '30'){
btnCd = '11';
} else {
btnCd = '10';
}
} else if (prd.saleStatCd === '17') {
btnCd = '30'; // 미í매 ìì¸í 보기 ì¶ê°(10/05)
}
} else if (['70', '80'].indexOf(stGbCd) > -1) {
// ìì§ì몰(기íì 몰)_ì²´íë¨ë§
if(
contextPath.indexOf("25_ma") > -1 ||
contextPath.indexOf("25_pa") > -1 ||
contextPath.indexOf("25_mx") > -1 ||
contextPath.indexOf("25_fan") > -1
){
if(prd.saleStatCd === '12'){
if(prd.bspkGoodsYn === 'Y' || prd.goodsAddTpCd === '30'){
btnCd = '11';
}else{
btnCd = '10';
}
}else{
btnCd = '00';
}
}
// ê·¸ì¸
else{
if (prd.saleStatCd === '12') {
if(prd.bspkGoodsYn === 'Y' || prd.goodsAddTpCd === '30'){
btnCd = '11';
} else if ('Y' === prd.goodsMdlExcpt.pfPricePointExcptYn) {
btnCd = '30';
} else if ('Y' === prd.activatePhoneYn) {
btnCd = '13';
}else if(prd.dlvrPckYn == 'Y' && stId == '752'){
btnCd = '30';
}else {
btnCd = '10';
}
} else if (prd.saleStatCd === '13') {
if (stId == '122' && prd.dlvrPckYn == 'Y' && prd.omsSendYn == 'N') {
btnCd = '10';
} else {
if (restockStYn === 'Y') {
btnCd = '20';
} else {
btnCd = '30';
}
}
} else if (prd.saleStatCd === '18') {
btnCd = '30';
} else if (prd.saleStatCd === '17') {
btnCd = '30'; // 미í매 ìì¸í 보기 ì¶ê°(10/05)
}
}
} else if (stGbCd === '50') {
if (prd.saleStatCd === '12') {
if(prd.bspkGoodsYn === 'Y' || prd.goodsAddTpCd === '30'){
btnCd = '11';
}else{
btnCd = '10';
}
} else if (prd.saleStatCd === '13') {
if (restockStYn === 'Y') {
btnCd = '20';
} else {
btnCd = '30';
}
} else if (['14', '15'].indexOf(prd.saleStatCd) > -1) {
btnCd = '30';
} else if (prd.saleStatCd === '17') {
btnCd = '30'; // 미í매 ìì¸í 보기 ì¶ê°(10/05)
}
} else if (stGbCd === '60') {
if (prd.saleStatCd === '12') {
if(prd.bspkGoodsYn === 'Y' || prd.goodsAddTpCd === '30'){
btnCd = '11';
}else{
btnCd = '10';
}
} else if (prd.saleStatCd === '13') {
if (restockStYn === 'Y') {
btnCd = '20';
} else {
btnCd = '30';
}
} else if (['17', '15'].indexOf(prd.saleStatCd) > -1) {
btnCd = '30';
}
} else if ((stGbCd === '90') && (stId === '193')) { // ìì§ì몰(eì¹´ë¬ë¡ê·¸) ì¤ 193ë² ì¬ì´í¸ ìì´ë ì¼ëë ìì¸í보기 ì ì¬ë
btnCd = '30';
} else if (stGbCd === '100') { // ììê³µì¸ëª°(ST_GB:100) ì¶ê°
if (prd.saleStatCd === '12') {
if(prd.customGoodsYn === 'Y' || prd.customGoodsYn === 'D'){
btnCd = '12';
}else{
if(prd.bspkGoodsYn === 'Y' || prd.goodsAddTpCd === '30') {
btnCd = '11';
} else if ('Y' === prd.activatePhoneYn) {
btnCd = '13';
} else {
btnCd = '10';
}
}
} else if (prd.saleStatCd === '13') {
if (prd.dlvrPckYn == 'Y' && prd.omsSendYn == 'N') {
btnCd = '10';
} else {
if (restockStYn === 'Y') {
btnCd = '20';
} else {
btnCd = '30';
}
}
} else if (['14', '16', '17', '15'].indexOf(prd.saleStatCd) > -1) {
btnCd = '30';
}
if(prd.mdlCode == 'SM-F926NZUYKOO' || prd.mdlCode == 'SM-F711NZUYKOO' || prd.mdlCode == 'SM-F916NZKAKOO' || prd.mdlCode == 'SM-F721NAWZKOO' || prd.mdlCode == 'SM-F946NAKZKOO'){
btnCd = '30';
}
}
html += '
';
if (btnCd === '10') {
if (stGbCd == '10' && prd.winePickupGoodsYn != null && prd.winePickupGoodsYn == 'Y' && prd.winePickupGoodsYn != '') {
html += ' 구매í기 ';
} else {
html += ' 구매í기 ';
}
} else if (btnCd === '11') {
html += ' ì¡°í©íì¬ êµ¬ë§¤í기 ';
} else if (btnCd === '13') {
if((stGbCd == '10' || (stGbCd == '80' && stId == '122')) && 'Y' == prd.goodsMdlExcpt.pfPricePointExcptYn){
}else{
html += ' ';
if ('Y' == prd.goodsMdlExcpt.buyCtaCustomYn && !!prd.buyCtaCustom) {
html += prd.buyCtaCustom;
} else {
html += 'ì ì²í기';
}
html += ' ';
}
} else if (btnCd === '20') {
// html += ' ì¬ì
ê³ ì림 ';
html += ' ì¬ì
ê³ ì림 ì ì² ';
// } else if (btnCd === '21') {
// html += ' ì¬ì
ê³ ì림 ';
} else if (btnCd === '30') {
if (stGbCd == '10' && prd.winePickupGoodsYn != null && prd.winePickupGoodsYn == 'Y' && prd.winePickupGoodsYn != '') {
html += ' ìì¸í 보기 ';
} else if((((stGbCd == '50' || stGbCd == '60') && prd.flagStr == '매ì¥í½ì
') || stGbCd == '80') && prd.useStkCd =='90') {
html += ' ë§¤ì¥ í½ì
';
} else if( (stGbCd == '10' || (stGbCd == '80' && stId == '122')) && 'Y' == prd.goodsMdlExcpt.pfPricePointExcptYn){// (ë·ì»´ or ê°¤ìº ì¤) and pf ííê° ë
¸ì¶ ì ì¸ ì
} else {
html += ' ìì¸í 보기 ';
}
} else if (btnCd === '00') { // ìì§ì몰(기íì 몰)_ì²´íë¨ë§
html += ' í매ì¢
ë£ ';
} else if (btnCd === '12') { //ìíìì± ì»¤ì¤í
ìí ì¼ë
html += ' ëìì¸í기 ';
}
//íí´ëì¤ [ê°ì¢ 보기] ë²í¼ ì¶ê° -//B2C íí´ëì¤ VOD ì ê· ê°ì¢ ì¶ê°ì ê±´ 2023.06.20 jjj
if (stGbCd == '10' && prd.homeClsGoodsYn != null && prd.homeClsGoodsYn == 'Y' && prd.homeClsGoodsYn != '') { //ClsCtgryCd
html += ' ê°ì¢ 보기 ';
}
html += '
';
return html;
}
/*
* @ í매ì¢
ë£ alert: ìì§ì몰(기íì 몰)_ì²´íë¨ë§
*/
function saleEndAlert() {
let alertData = {
title: "alert",
content: "íë§¤ê° ì¢
ë£ëììµëë¤."
};
commonAlert(alertData);
openLayer('commonAlert');
}
function appenPfPrdCardAdvAndGetStartIdx(index) {
var page = $('#page').val();
var liClass = '';
if (page !== '1') {
return index;
}
if (pfPrdCardAdv == undefined) {
return index;
}
if (pfPrdCardAdv.cardTpCd === '10' && index == 0) { //ëí ì¹´ë ë°°ë
liClass = 'visual visual-col2';
} else if (pfPrdCardAdv.cardTpCd === '20') { //ìí ì¹´ë ë°°ë
liClass = 'visual';
}
var prdLink = '';
if (pfPrdCardAdv.linkUrl != null && pfPrdCardAdv.linkUrl != '') {
prdLink = pfPrdCardAdv.linkUrl;
} else {
prdLink = '/sec/' + pfPrdCardAdv.goodsPath;
}
var html = '';
//10:ëí 20:ìí
if (pfPrdCardAdv.cardTpCd === '10' && index == 0) {
html += '
';
html += ' ';
html += '
';
html += '
';
html += '
';
html += '
';
html += '
';
html += '
';
//html += '
2020 New ì
°í컬ë ì
í¨ë°ë¦¬íë¸
';
html += '
' + pfPrdCardAdv.bnrText + '
';
//html += '
2020-04-24 ~ 2020-05-31
';
html += '
';
html += '
';
html += '
';
//html += ' ìì¸í 보기 ';
//html += ' ë¹êµí기 ';
html += ' ';
html += '
';
html += '
';
html += '
';
html += ' ';
$('.list-product > .list ').append(html);
index = 2;
appendPfBannerAdv(index);//KDP-44827 [FO][ê³µíµ][ìí] PF ë§ì¼í
ë°°ë ê´ë¦¬ ê¸°ë¥ ìì ê±´. pcd ë°°ë 2í1ì´+ë§ì¼í
ë°°ë 1íì+모ë°ì¼2ì´ë³´ê¸° ìí©ìì ë§ì¼í
ë°°ë ë¹ë
¸ì¶ ì¤ë¥ ë°©ì§
appendPfBannerCounsel(index);
}else if(pfPrdCardAdv.cardTpCd === '20' && index == (pfPrdCardAdv.showPstCd-1)) {
html += '
';
html += ' ';
html += ' ';
$('.list-product > .list ').append(html);
index++;
appendPfBannerAdv(index);//KDP-44827 [FO][ê³µíµ][ìí] PF ë§ì¼í
ë°°ë ê´ë¦¬ ê¸°ë¥ ìì ê±´. pcd ë°°ë 2í1ì´+ë§ì¼í
ë°°ë 1íì+모ë°ì¼2ì´ë³´ê¸° ìí©ìì ë§ì¼í
ë°°ë ë¹ë
¸ì¶ ì¤ë¥ ë°©ì§
appendPfBannerCounsel(index);
$('#productCardBannerYn').val('Y');
}
return index;
}
function appendProductCard(products, sortBtn, wishGoods) {
var ctgPath = 'memory-storage';
// pfPrdCardAdv ì¶ê°
var startIdx = 0;
var productCnt = 0;
if(wishGoods != null && wishGoods.length > 0){
for(var i = 0; i < products.length; i++){
if(wishGoods.indexOf(products[i].goodsId) > -1){
products[i].wishYn = "Y";
}
}
}
var index = 0;
$.each(products, function(idx, prd) {
appendPfBannerAdv(index);
appendPfBannerCounsel(index);
index = appenPfPrdCardAdvAndGetStartIdx(index);
var html = '';
if(prd.outletFlgYn != null && prd.outletFlgYn =='Y'){
html += '
';
}else{
html += ' ';
}
html += htmlProductCard(prd, idx);
html += ' ';
$('.list-product > .list ').append(html);
productCnt++;
index++;
//KDP-44827 [FO][ê³µíµ][ìí] PF ë§ì¼í
ë°°ë ê´ë¦¬ ê¸°ë¥ ìì ê±´.
//ìµì¢
ìí ì¹´ë ë¤ì Product Cardí ê´ê³ ë°°ë ì¤ì í ê²½ì° ì¸ë±ì¤ ì ë§ì ë°°ë ê·¸ë¦¬ì§ ëª»íê³ ë°ë³µë¬¸ íì¶íë ì¤ë¥ í´ê²°
if(index == products.length){
appenPfPrdCardAdvAndGetStartIdx(index);
}
});
// ì¹ì ê·¼ì± í¬ì»¤ì± ì²ë¦¬
$(".list-product li .item-inner").find('.swiper-img[data-focus-target="true"]').focus();
$(".list-product li .item-inner").find('.swiper-img[data-focus-target="true"]').removeAttr("data-focus-target");
index = 0;
/* setPfSwiper > pfListHeight ìì¼ë¡ ì²ë¦¬í´ì¼ ì ì©
* KDP-81651 [í¼ë¸]PF ê°¤ë¬ë¦¬ì´ë¯¸ì§ ì¤ìì´í ë³ê²½ì ê±´ */
setPfSwiper();
/* PF ëª©ë¡ ëì´ ì¡°ì */
pfListHeight();
var totalCount = $('#totalCount').val();
var page = $('#page').val();
var rows = $('#rows').val();
var presentPrdCount = $('#presentPrdCount').val();
var totalPage = 0;
// ì ë ¬ì
if(sortBtn == "sort") {
var totalPresentCount = parseInt(productCnt);
} else {
// ë보기
var totalPresentCount = parseInt(presentPrdCount) + parseInt(productCnt);
}
// ë보기 ë²í¼ íì´ì§ íì
// product cardí ê´ê³ ìì ë
if($('#productCardBannerYn') == 'Y'){
totalPage = Math.ceil(( parseInt(totalCount) + 1) / g_rows);
// product cardí ê´ê³ ìì ë
} else {
totalPage = Math.ceil( parseInt(totalCount) / g_rows);
}
$('#presentPageCount').text(page);
$('#totalPageCount').text(totalPage);
if (parseInt(totalPresentCount) < parseInt(totalCount)) {
$('#morePrd').prop('disabled', false);
$('#morePrd').show();
} else {
$('#morePrd').prop('disabled', true);
$('#morePrd').hide();
}
$('#presentPrdCount').val(totalPresentCount);
// ê´ì¬ìí ì´ê¸°í
initBtnGoods();
if(scroll > 0){
setTimeout(function(){
$(window).scrollTop(scroll);
scroll = 0;
}, 100);
}
}
function personalizeProductCard(data) {
let products = data.products;
let wishGoods = data.wishGoods;
let isLogin = data.isLogin;
let svmnUseYn = data.svmnUseYn;
$.each(products, function(idx, prd) {
$('.btn-good[data-goods-id="' + prd.goodsId + '"]').each(function(index, btn) {
// ì°í기 ìì
$(btn).removeClass("on");
$(btn).attr("aria-label", $(btn).data("goods-nm")+" ì¢ìì 미ì í"); // ì¹ ì ê·¼ì±
// $(btn).children('i').text('ì¢ìì 미ì í');
$(btn).removeAttr('title');
if('10' == '10'){
$(btn).find('.svg-icon.default').show();
$(btn).find('.svg-icon.active').hide();
}
});
if($('#li-prd-'+prd.goodsId+' > div > div.card-price > div.point-detail').length){
if(prd.saleStatCd == '12' || prd.saleStatCd == '13' || prd.saleStatCd == '14' ){
if(stGbCd == '10' && prd.membershipUseExcptYn == 'N' && (prd.carePlusType == null || typeof prd.carePlusType == "undefined" || prd.carePlusType == "N" || prd.carePlusType == "CP") ){
if(prd.thirdPartyYn == 'N'){
if (isLogin && prd.membershipYn != 'Y') {
// 멤ë²ì ê°ì
í기 ë¶ì¬
var html = '
ì¼ì±ì ì 멤ë²ì ê°ì
í기 ';
$('#li-prd-'+prd.goodsId+' > div > div.card-price > div.point-detail').empty();
$('#li-prd-'+prd.goodsId+' > div > div.card-price > div.point-detail').append(html);
} else {
if((prd.bspkGoodsYn === 'Y' || prd.goodsAddTpCd === '30') && 'Y' == 'Y' ){
if(prd.bespokeMinimumPrice != null && prd.bespokeMinimumPrice != 0){
//ë¹ì¤í¬í¬ ìµì ê° ìì ê²½ì°
$('#li-prd-'+prd.goodsId+' > div > div.card-price > div.point-detail > span.point').text(fnComma(prd.membershipPoint)+'P~');
}
//ë¹ì¤í¬í¬ ìµì ê° ìì ê²½ì° ë©¤ë²ì 미ë
¸ì¶
}else{
$('#li-prd-'+prd.goodsId+' > div > div.card-price > div.point-detail > span.point').text(fnComma(prd.membershipPoint)+'P');
}
}
}
}
if((stGbCd == '20' || stGbCd == '30') && (prd.carePlusType == null || typeof prd.carePlusType == "undefined" || (prd.carePlusType != "R" && prd.carePlusType != "I")) ){
if (isLogin && prd.membershipYn != 'Y') {
// 멤ë²ì ê°ì
í기 ë¶ì¬
if(stId == 2){
var html = '
ì 립 ìì í¬ì¸í¸ ';
html += '
íì¸í기 ';
}else{
var html = '
ì¼ì±ì ì 멤ë²ì ì°ëí기 ';
}
$('#li-prd-'+prd.goodsId+' > div > div.card-price > div.point-detail').empty();
$('#li-prd-'+prd.goodsId+' > div > div.card-price > div.point-detail').append(html);
} else {
if((prd.bspkGoodsYn === 'Y' || prd.goodsAddTpCd === '30')
&& 'Y' == 'Y'
&&( (stGbCd == 20 && isLogin) ||
(stGbCd == 30 && isLogin))
){
if(prd.bespokeMinimumPrice != null && prd.bespokeMinimumPrice != 0){
//ë¹ì¤í¬í¬ ìµì ê° ìì ê²½ì°
$('#li-prd-'+prd.goodsId+' > div > div.card-price > div.point-detail > span.point').text(fnComma(prd.membershipPoint)+'P~');
}
//ë¹ì¤í¬í¬ ìµì ê° ìì ê²½ì° ë©¤ë²ì 미ë
¸ì¶
}else{
$('#li-prd-'+prd.goodsId+' > div > div.card-price > div.point-detail > span.point').text(fnComma(prd.membershipPoint)+'P');
}
}
}
if( ((stGbCd == '80' && '1' == '122')
|| (stGbCd == '20' && '1' == '2')
|| (stGbCd == '30' && '1' == '3')
|| (stGbCd == '30' && '1' == '7'))
&& svmnUseYn != 'N'
&& 'Y' != prd.goodsMdlExcpt.pfPricePointExcptYn ){
if (isLogin && prd.membershipYn != 'Y') {
var html = '
ì¼ì±ì ì 멤ë²ì ì°ëí기 ';
$('#li-prd-'+prd.goodsId+' > div > div.card-price > div.point-detail').empty();
$('#li-prd-'+prd.goodsId+' > div > div.card-price > div.point-detail').append(html);
} else {
var html = '
ì 립 ìì í¬ì¸í¸ '+ fnComma(prd.membershipPoint) + 'P' +' ';
$('#li-prd-'+prd.goodsId+' > div > div.card-price > div.point-detail').empty();
$('#li-prd-'+prd.goodsId+' > div > div.card-price > div.point-detail').append(html);
}
}
}
}
});
$.each(wishGoods, function(idx, wishGoodsId){
$('.btn-good[data-goods-id="' + wishGoodsId + '"]').each(function(index, btn) {
// ì°í기 ì¶ê°
$(btn).addClass("on");
$(btn).attr("aria-label", $(btn).data("goods-nm")+" ì¢ìì ì í"); // ì¹ ì ê·¼ì±
// $(btn).children('i').text('ì¢ìì ì í');
$(btn).attr("title", "ì íë¨");
if('10' == '10'){
$(btn).find('.svg-icon.default').hide();
$(btn).find('.svg-icon.active').show();
}
});
});
}
function appendNoList(){
var html = '';
html += '
';
html += '';
html += 'í매 ê°ë¥í ìíì´ ììµëë¤. ';
html += '
';
html += ' ';
$('.list-product > .list ').append(html);
}
function initBtnGoods() {
$('.btn-good').off().on('click', function(e) {
e.preventDefault();
var btnclass = $(this);
goodsPf.fnLoginCheck(function(isLogin){
if(!isLogin){
location.href = '/sec/' + "member/indexLogin/?returnUrl=" + location.pathname;
return;
}else{
var goodsId = $(e.target).closest('button').data('goods-id');
var homeClsGoodsYn = $(e.target).closest('button').data('home-cls-goods-yn');////KDP-41178[B2C][ìí] íí´ëì¤ ìì ì¬í - ì°í기
if(btnclass.hasClass('on')){
var url = '/sec/' + 'xhr/goods/user/deleteWish';
}else{
var url = '/sec/' + 'xhr/goods/user/insertWish';
}
ajax.call({
url : url
, data: {goodsId: goodsId}
, done: function(data) {
$('.btn-good[data-goods-id="' + goodsId + '"]').each(function(index, btn) {
if (data.actGubun === 'add') {
// ì°í기 ì¶ê°
$(btn).addClass("on");
$(btn).attr("aria-label", $(btn).data("goods-nm")+" ì¢ìì ì í"); // ì¹ ì ê·¼ì±
//$(btn).children('i').text('ì¢ìì ì í');
$(btn).attr("title", "ì íë¨");
$('.btn-good[data-goods-id="' + goodsId + '"]').next().show();
$('.btn-good[data-goods-id="' + goodsId + '"]').next().next().hide();
if('10' == '10'){
$(btn).find('.svg-icon.default').hide();
$(btn).find('.svg-icon.active').show();
}
$('.bookmarkOn').find('a').off().on('click', function (){
// ì 체보기
if(homeClsGoodsYn == 'Y'){//KDP-41178[B2C][ìí] íí´ëì¤ ìì ì¬í - ì°í기: ëì íí´ëì¤ > ë´ê° ì°í ê°ì¢ ë¡ ì´ë
location.href = '/sec/' + "homefitness/myhome/indexMyHotClsList/";
}else{
location.href = '/sec/' + "mypage/interest/indexMyHotList/";
}
});
// ì ëë¸ë¦ì¤ ë·ì»´ ì± ì ì©_230112, ì¹ ì ì©_230202
if('1' == '1') {
let adbrixId = '#li-prd-' + goodsId;
let fromData = $(e.target).parents(adbrixId);
let adbrixSalePrice = 0;
let adbrixTotalPrice = 0;
if(fromData.length == 0) {
fromData = $(e.target).closest('li');
adbrixSalePrice = parseInt(fromData.find('.prd-price').children('#curPrice').val());
adbrixTotalPrice = parseInt(fromData.find('.prd-price').children('#salePrice').val());
} else {
adbrixSalePrice = parseInt(fromData.find('.price-detail .box-tip').find('li del').first().text().slice(0, -2).replace(/,/g, ''));
adbrixTotalPrice = parseInt(fromData.find('.total').children('.price').text().slice(0, -2).replace(/,/g, ''));
}
let adbrixProductId = fromData.find('.prd-num').text();
let adbrixProductName = fromData.find('.prd-name').text();
let adbrixProductPrice = adbrixSalePrice;
let adbrixProductDiscount = adbrixSalePrice - adbrixTotalPrice;
let adbrixProductQuantity = 1;
let adbrixProductCategory = 'PC/주ë³ê¸°ê¸°';
let adbrixProductCategorySub = 'ë©ëª¨ë¦¬/ì¤í 리ì§';
if($('#secAppYn').val() == 'Y' || device.isIosApp) {
let adbrixEventParam = {};
let adbrixProduct = {};
let adbrixProductList = [];
adbrixProduct.productId = adbrixProductId;
adbrixProduct.productName = adbrixProductName;
adbrixProduct.price = adbrixProductPrice;
adbrixProduct.discount = adbrixProductDiscount;
adbrixProduct.quantity = adbrixProductQuantity;
adbrixProduct.category = adbrixProductCategory;
adbrixProduct.categorySub = adbrixProductCategorySub;
adbrixProductList.push(adbrixProduct);
adbrixEventParam.productList = adbrixProductList;
adbrixEventParam.attrModel = {"service_id":"SDC"};
//Adbrix Native call
let adbrixEventParamJsonStr = JSON.stringify(adbrixEventParam);
if(window.secapp) {
window.secapp.addToWishList(adbrixEventParamJsonStr);
} else if(device.isIosApp) {
if (
window.location.hostname == 'dev-www.samsung.com'
|| window.location.hostname == 'stg-www.samsung.com'
|| window.location.hostname == 'www.samsung.com'
|| window.location.hostname == 'dev-familynet.samsung.com'
|| window.location.hostname == 'stg-familynet.samsung.com'
|| window.location.hostname == 'familynet.samsung.com'
) {
window.webkit.messageHandlers.callNative.postMessage(JSON.stringify({fun:"addToWishList", p1:adbrixEventParamJsonStr}));
} else {
console.log('ë©ìì§ë¥¼ ë³´ë¼ ì ìë ëë©ì¸ì
ëë¤.');
}
}
} else {
adbrix.onInitialized(function adbrixInitialized() {
var product = adbrix.commerceAttr.product(
adbrixProductId
, adbrixProductName
, adbrixProductPrice
, adbrixProductQuantity
, adbrixProductDiscount
, 'KRW'
, adbrix.commerceAttr.categories( adbrixProductCategory, adbrixProductCategorySub )
);
adbrix.commerce.addToWishList(product);
});
}
goodsGA4.fnGA4addToWishList(data.GA4goodsDetail);
}
} else if(data.actGubun === 'remove') {
// ì°í기 ìì
$(btn).removeClass("on");
$(btn).attr("aria-label", $(btn).data("goods-nm")+" ì¢ìì 미ì í"); // ì¹ ì ê·¼ì±
// $(btn).children('i').text('ì¢ìì 미ì í');
$(btn).removeAttr('title');
$('.btn-good[data-goods-id="' + goodsId + '"]').next().next().show();
$('.btn-good[data-goods-id="' + goodsId + '"]').next().hide();
if('10' == '10'){
$(btn).find('.svg-icon.default').show();
$(btn).find('.svg-icon.active').hide();
}
}else if(data.actGubun === 'MYPAGE0001'){
let alertData = {
title: ""
,content : "100ê°ê¹ì§ ì°í ì ììµëë¤."
,btnText : "íì¸"
};
commonAlert(alertData);
openLayer('commonAlert');
}else if(data.actGubun === 'vip'){
var alertData = {
title: ""
,content : "í¹ë³ê´ ìíì ì°íê¸°ê° ë¶ê°ë¥í©ëë¤."
,btnText : "íì¸"
};
commonAlert(alertData);
openLayer('commonAlert');
}else if(data.actGubun === 'noVip'){
location.href = '/sec/';
}
// var vTimer = setTimeout((function(){
// $('.bookmarkTooltip').fadeOut(300);
// }), 5000);
$(document).click(function (e){
if($(btn).has(e.target).length === 0){
// clearTimeout(vTimer);
$('.bookmarkOn').fadeOut(300);
$('.bookmarkOff').fadeOut(300);
// btnclass.off();
}
});
});
}
});
}
});
});
}
function fnGetPfPrd(goodsId, targetId, focusId) {
// var target = $(event.currentTarget);
var pfSwiperIndex = null;
let showWaitFlag;
if($('#pfAcamaiUseYn').val()=='Y'){
showWaitFlag = false;
}else{
showWaitFlag = true;
}
ajax.call({
data : {
goodsId: goodsId, targetId: targetId, pfFasterUseYn : $('#pfFasterUseYn').val(), aiscCtgYn : $("#aiscCtgYn").val()
}
, url : "/sec/xhr/pf/goods"
, type: 'POST'
, dataType : 'json'
, showWait : showWaitFlag
, done: function (data) {
let stId = '1';
// KDP-72192 [B2C][FO]ë¹ì¼ë°°ì¡ ë¹ì¼ì¤ì¹ PF ì¦ìë°ì
sameIstAvailTimeVO = data.sameIstAvailTimeVO
sameDlvrAvailTimeVO = data.sameDlvrAvailTimeVO
if (!isSameDayAvailableTime(sameIstAvailTimeVO)) {
$('#pfFilterArea > ul > li > div.list-box input[data-search-filter="sameIst"]').prop('disabled', true);
$('#pfFilterArea_mo > div > ul > li > div.list-box input[data-search-filter="sameIst"]').prop('disabled', true);
}
if (!isSameDayAvailableTime(sameDlvrAvailTimeVO)) {
$('#pfFilterArea > ul > li > div.list-box input[data-search-filter="sameDlvr"]').prop('disabled', true);
$('#pfFilterArea_mo > div > ul > li > div.list-box input[data-search-filter="sameDlvr"]').prop('disabled', true);
}
$('#' + data.targetId).html(htmlProductCard(data.product));
$('#' + data.targetId).attr('id', 'li-prd-' + data.product.goodsId);
//ì¹ì ê·¼ì± - í¬ì»¤ì¤ ì ì§. 2021.01.14
if (focusId !== null && focusId !== undefined && $.trim(focusId).length > 0) {
$("#"+focusId).focus();
}
//$('.filter-slick').filter(':not(.slick-initialized)').slick(fliterSlickPfOpt);
if(stId == "1") {
if(data.product.wishYn ==="Y") {
// ì° ëì´ììë
$('.btn-good[data-goods-id="' + data.product.goodsId + '"]').find('.svg-icon.default').hide();
$('.btn-good[data-goods-id="' + data.product.goodsId + '"]').find('.svg-icon.active').show();
} else {
$('.btn-good[data-goods-id="' + data.product.goodsId + '"]').find('.svg-icon.default').show();
$('.btn-good[data-goods-id="' + data.product.goodsId + '"]').find('.svg-icon.active').hide();
}
}
// ê´ì¬ìí ì´ê¸°í
initBtnGoods();
filterSel(); /* ìµì
ì¢ì° ì¤í¬ë¡¤ ë²í¼ ì¶ê° */
/* KDP-81651 [í¼ë¸]PF ê°¤ë¬ë¦¬ì´ë¯¸ì§ ì¤ìì´í ë³ê²½ì ê±´ */
pfSwiperIndex = $("li.item[id*='li-prd-']").index($("li.item[id='li-prd-"+goodsId+"']"));
setPfSwiperSingle(pfSwiperIndex,"#li-prd-"+goodsId+" div.pf-swiper");
/* PF ëª©ë¡ ëì´ ì¡°ì */
pfListHeight();
var selectedRadioButton = $('#' + focusId);
goodsGA4.fnGA4productCustomization(data, selectedRadioButton, false);
}
});
}
var morePrdWorking = true;
var isLoginCheck = false;
function morePrd() {
if(morePrdWorking)
{
morePrdWorking=false;
$('#morePrd').prop('disabled', true);
var page = $('#page').val();
page++;
$('#page').val(page);
var queryString = '';
var minMaxValList = [];
$('.opt-area > span').each(function(index, item) {
queryString += (queryString === '' ? '' : '+') + $(item).data('search-filter');
if($(item).data('min-max-val') != ''){
minMaxValList.push($(item).data('min-max-val'));
}
});
$('#rows').val(g_rows);
if($('#pfAcamaiUseYn').val()=='Y'){
url = "/sec/cxhr/pf/goodsListMore";
showWaitFlag = false;
type = 'GET'
}else{
url = "/sec/xhr/pf/goodsListMore";
showWaitFlag = true;
type = 'POST'
}
ajax.call({
data : {
searchFilter: queryString
, dispClsfNo: 40030000
, sortType: $('#filterSortType').val()
, page: page
, offset : $('#presentPrdCount').val()
, rows: $('#rows').val()
, minMaxValList : minMaxValList
, soldOutExceptYn : $('#soldOutExceptYn').val() //
, pfFasterUseYn : $('#pfFasterUseYn').val()
, secApp : $("#secAppYn").val() == 'Y'
, secIos : $("#secIosYn").val() == 'Y'
, aiscCtgYn : $("#aiscCtgYn").val()
, tcPlantCode : $("#tcPlantCode").val()
}
, url : url
, type: type
, dataType : 'json'
, showWait : showWaitFlag
, done: function (data) {
// KDP-72192 [B2C][FO]ë¹ì¼ë°°ì¡ ë¹ì¼ì¤ì¹ PF ì¦ìë°ì
sameIstAvailTimeVO = data.sameIstAvailTimeVO;
sameDlvrAvailTimeVO = data.sameDlvrAvailTimeVO;
if (!isSameDayAvailableTime(sameIstAvailTimeVO)) {
$('#pfFilterArea > ul > li > div.list-box input[data-search-filter="sameIst"]').prop('disabled', true);
$('#pfFilterArea_mo > div > ul > li > div.list-box input[data-search-filter="sameIst"]').prop('disabled', true);
}
if (!isSameDayAvailableTime(sameDlvrAvailTimeVO)) {
$('#pfFilterArea > ul > li > div.list-box input[data-search-filter="sameDlvr"]').prop('disabled', true);
$('#pfFilterArea_mo > div > ul > li > div.list-box input[data-search-filter="sameDlvr"]').prop('disabled', true);
}
goodsGA4.fnGA4viewItemList(data.products);
// ìì¹´ë§ì´ ì¬ì© ì¬ì´í¸ë personalizationìì ê°ì ¸ì¤ë wishGoods ì¬ì©
if($('#pfAcamaiUseYn').val()=='Y'){
data.wishGoods = null;
}
if (data.reloadNeeded) {
location.reload();
} else {
appendProductCard(data.products, '', data.wishGoods);
setTimeout((function () {
pfListHeight();
}), 1500);
morePrdWorking=true;
}
if($('#pfAcamaiUseYn').val()=='Y'){
var pfGoodsList = [];
if(!!data.products){
for(var i=0 ; i
0){
personalizeProductCard(data);
}
}
});
}
}
//ì¹ì ê·¼ì± - í¬ì»¤ì¤ ì ì§. 2024-06-03
var goodFocusId = data.products[0].goodsId;
if (goodFocusId !== null && goodFocusId !== undefined && $.trim(goodFocusId).length > 0) {
$("#li-prd-"+goodFocusId).find('a.swiper-img').focus();
}
}
});
}
}
$(window).scroll(function() {
if ( $(window).scrollTop() >= $("#morePrd").offset().top - $(window).height())
{
if($('#morePrd').is(':visible')){
var stGbCd = '10';
if(morePrdWorking && (stGbCd == '20' || stGbCd == '30'))
{
$("#morePrd").trigger('click');
}
}
}
});
$(window).on('popstate', function(event) {
//itemInit($('#odrDeliveryCycleBtn').parent().find('.focused').data('sort-type'));
window.location = document.location.href;
});
function buyNow(goodsId) {
var reqData = {
goodsIds : goodsId,
stGbCd : "10",
stId : "1",
mbrNo : "0",
nowBuyYn : "Y",
buyQtys : 1,
orderType : "ONCE",
};
var nowBuyOptions = {
url : "/sec/xhr/order/insertCart"
, data : reqData
, done : function(data){
var form = document.createElement('form');
form.setAttribute('action', "/sec/order/");
form.setAttribute('target', "_self");
form.setAttribute('method', 'post');
document.body.appendChild(form);
form.submit();
}
};
ajax.call(nowBuyOptions);
}
function appendPfBannerAdv(currentIdx) {
//console.log(currentIdx + ", " + currentIdx / 3);
var page = $('#page').val();
var startIdx = 0;
var liClass = '';
if (page !== '1') {
return;
}
if (pfBannerAdv == undefined) {
return;
}
//KDP-44827 [FO][ê³µíµ][ìí] PF ë§ì¼í
ë°°ë ê´ë¦¬ ê¸°ë¥ ìì ê±´
var calNum = 0;
//모ë°ì¼ 2ê°ì© 보기ìì 2íì,4íì ë°°ì¹ì card li ì§ìë¡ ì±ì´í ë¶ì¬ì§ëë¡ idx 1 ëí´ì¤
if(device.val == 'm' && $('#gridType').val() == '2' && parseInt(pfBannerAdv.showPstCd) > 1 && parseInt(pfBannerAdv.showPstCd)%2 == 0){
calNum = 1;
}
if(currentIdx === (parseInt(pfBannerAdv.showPstCd) - 1) * 3 + calNum) {
var prdLink = '';
if(pfBannerAdv.linkUrl != null && pfBannerAdv.linkUrl != ''){
prdLink = pfBannerAdv.linkUrl;
}else{
prdLink = '/sec/' + pfBannerAdv.goodsPath;
}
liClass += ' ';
liClass += ' ';
liClass += ' ';
liClass += ' ';
liClass += ' ';
liClass += '
';
liClass += '
';
liClass += '
';
liClass += ' ';
liClass += ' ';
liClass += ' '; //KDP-44827 [FO][ê³µíµ][ìí] PF ë§ì¼í
ë°°ë ê´ë¦¬ ê¸°ë¥ ìì ê±´. í´í ê¹¨ì§ ë°©ì§ì© ìíindex í/ì§ ë§ì¶ê¸° ìí´ ì½ì
$('.list-product > .list ').append(liClass);
};
}
function appendPfBannerCounsel(currentIdx) {
var page = $('#page').val();
var startIdx = 0;
var liClass = '';
if (page !== '1') {
return;
}
if (pfBannerCounsel == undefined) {
return;
}
var calNum = 0;
//모ë°ì¼ 2ê°ì© 보기ìì 2íì,4íì ë°°ì¹ì card li ì§ìë¡ ì±ì´í ë¶ì¬ì§ëë¡ idx 1 ëí´ì¤
if(device.val == 'm' && $('#gridType').val() == '2' && parseInt(pfBannerCounsel.showPstCd) > 1 && parseInt(pfBannerCounsel.showPstCd)%2 == 0){
calNum = 1;
}
if(currentIdx === (parseInt(pfBannerCounsel.showPstCd) - 1) * 3 + calNum) {
var prdLink = '';
if(pfBannerCounsel.linkUrl != null && pfBannerCounsel.linkUrl != ''){
prdLink = pfBannerCounsel.linkUrl;
}else{
prdLink = '/sec/' + pfBannerCounsel.goodsPath;
}
liClass += ' ';
liClass += ' ';
liClass += ' ';
liClass += ' ';
liClass += ' ';
liClass += '
';
liClass += '
';
liClass += '
';
liClass += ' ';
liClass += ' ';
liClass += ' '; //KDP-44827 [FO][ê³µíµ][ìí] PF ë§ì¼í
ë°°ë ê´ë¦¬ ê¸°ë¥ ìì ê±´. í´í ê¹¨ì§ ë°©ì§ì© ìíindex í/ì§ ë§ì¶ê¸° ìí´ ì½ì
$('.list-product > .list ').append(liClass);
};
}
//ì 문ìë´í¸ì¶
function fnOpenCounsel() {
goodsPf.fnLoginCheck(function(isLogin){
if(!isLogin){
let alertData = {
content : "ë¡ê·¸ì¸ì´ íìí©ëë¤."
, callback: function(){
location.href = '/sec/' + "member/indexLogin/?returnUrl=" + location.pathname;
}
};
commonAlert(alertData);
openLayer('commonAlert');
}else{
specialCounselAplPop();
}
});
}
function productCompareView(prd) {
const DRYER_DISP_CLSF_NO = '37080000';
var html = '';
var dispClsfNo = '40030000';
var compDispClsfEnNm = prd.compDispClsfEnNm;
//b2c, fnet, fnet_ëí ë¹êµí기
if('1' == '1' || '1' == '2' || '1' == '3' || '1' == '200' || '1' == '471'){
//KDP-50668 건조기 ì¸ ê²½ì° ë¨íë§ ë
¸ì¶
if( dispClsfNo == DRYER_DISP_CLSF_NO){
if(prd.goodsTpCd == '10'){
html += 'ë¹êµí기 ';
}
}else {
html += ' ë¹êµí기 ';
}
//b2c, fnet, fnet_ëí ì ì¸ ë¹êµí기
}else{
//KDP-50668 건조기 ì¸ ê²½ì° ë¨íë§ ë
¸ì¶
if(dispClsfNo == DRYER_DISP_CLSF_NO){
if(prd.goodsTpCd == '10') {
html += 'ë¹êµí기 ';
}
}else {
html += ' ë¹êµí기 ';
}
}
return html;
}
function isGcsLogin() {
var options = {
url: "/sec/xhr/member/getSession",
type: "POST",
async : false,
done: function(returnUrl) {
if("0" == JSON.parse(returnUrl).mbrNo){
window.location.href = "/sec/member/introPage/?returnUrl=" + window.location.pathname;
}
else if( "0" == JSON.parse(returnUrl).gcsMbrNo){
window.location.href = "/sec/member/loginDocumentEmailCheck";
}
}
};
ajax.call(options);
}
function isVipLogin() {
var options = {
url: "/sec/xhr/goods/vipLoginCheck",
type: "POST",
data : { dispClsfNo: '40030000' },
async : false,
done: function(data) {
if(!data.isLogin){
window.location.href = "/sec/";
}
}
};
ajax.call(options);
}
function gridCol1(){
$('.mo_ver2.pf-container .pf-prd-cardlist').removeClass('col-2');
$('.mo_ver2.pf-container .viewCtrl-area').removeClass('col-2'); //230714
$('.mo_ver2 .btn.col1').addClass('on'); //230714
$('.mo_ver2 .btn.col2').removeClass('on'); //230714
$('#gridType').val('1');
}
function gridCol2(){
$('.mo_ver2.pf-container .pf-prd-cardlist').addClass('col-2');
$('.mo_ver2.pf-container .viewCtrl-area').addClass('col-2'); //230714
$('.mo_ver2 .btn.col2').addClass('on'); //230714
$('.mo_ver2 .btn.col1').removeClass('on'); //230714
$('#gridType').val('2');
}
//B2C MO 1ë¨
function viewCtrlCol1(){
$('.pf-container .pf-prd-cardlist .list-product .list > li.item:first-of-type .swiper-wrapper').removeClass('move'); // 20250421 KDP-81651 [í¼ë¸]PF ê°¤ë¬ë¦¬ì´ë¯¸ì§ ì¤ìì´í ë³ê²½ì ê±´ - .card-img í´ëì¤ ì ê±°
gridCol1();
itemInit();
}
//B2C MO 2ë¨
function viewCtrlCol2(){
$('.pf-container .pf-prd-cardlist .list-product .list > li.item:first-of-type .swiper-wrapper').removeClass('move'); // 20250421 KDP-81651 [í¼ë¸]PF ê°¤ë¬ë¦¬ì´ë¯¸ì§ ì¤ìì´í ë³ê²½ì ê±´ - .card-img í´ëì¤ ì ê±°
gridCol2();
itemInit();
}
function disabledFilter(item, multiYn){
var itemId = $(item).attr('id');
if(multiYn =='N'){
$('#'+itemId).parent().siblings().find('input:checkbox').prop('disabled', true);
$('#'+itemId).prop('disabled', false);
}else if(multiYn =='Y'){
$('#'+itemId).prop('disabled', false);
}
}
// ê°íµí° ê°ê²© í´í ì¡°ì
function fnOpenMonthlyPriceToolTip(self) {
$(self).toggleClass('open');
$(self).siblings('.popup-monthly-price').toggleClass('active');
}
function fnCloseMonthlyPriceToolTip() {
$('.btn-monthly-price').removeClass('open');
$('.popup-monthly-price').removeClass('active');
}
$(document).ready(function() {
if($('#pfAcamaiUseYn').val() !='Y' || '10' != '10'){
goodsPf.fnisLoginCheck(function(isLogin){
if(isLogin){
$('.login-failB2B').remove();
}else{
$('.login-sucB2B').remove();
if(stGbCd == '100' && 1 == '80'){
$(".list-product").addClass('B2B2C');
}
}
isLoginCheck=isLogin;
});
}
if('80' == '10' && '1' == '122'){
isGcsLogin();
}
if('70' == '10' && '266' == '1'){
isVipLogin();
}
// 모ë°ì¼ì ê·¼ì± 221123-27p
const dataFocusNext = document.querySelectorAll("[data-focus-next]");
[].forEach.call(dataFocusNext, function(elem){
elem.addEventListener('click',function(e){
const target = e.target.dataset.focusNext;
document.querySelector(`[data-focus=`+target+`]`).focus();
})
});
/* ì ë ¬ìì ë³ê²½ */
$('#odrDeliveryCycleBtn').parent().find('li').on('click', function(e) {
$('#filterSortType').val($(this).data('sort-type'));
itemInit($(this).data('sort-type'));
$('#sortItemButton').html($(this).data('sort-nm')+' ');
goodsGA4.fnGA4clickSort($(this).data('omni'));
});
/*B2C MO ê³ ëí : íì
ì ë ¬ìì ë³ê²½*/
$('#odrDeliveryCycleMo').find('li').on('click', function(e) {
$('#filterSortType').val($(this).data('sort-type'));
$('#sortItemButton').html($(this).data('sort-nm')+' ');
if('50' == '10'){
$('#sortItemButton').attr('title', "ì ë ¬ìì");
}else{
$('#sortItemButton').attr('aria-label', $(this).data('sort-nm'));
}
itemInit($(this).data('sort-type'));
});
var sFilters = new Array();
''
//ì§ì
ì ì íí íí° ìì¼ë©´ ëì
$.each(sFilters, function(idx, filter) {
$('#pfFilterArea').find('input:checkbox').each(function(idx, item) {
var minVal = $(item).data('min-val');
var maxVal = $(item).data('max-val');
if (filter == $(item).data('search-filter')) {
var minMaxVal = '';
if(minVal != '' || maxVal != ''){
minVal == '' ? minVal = '0' : minVal;
maxVal == '' ? maxVal = '99999999' : maxVal;
minMaxVal = minVal+':'+maxVal;
}
// ì¶ê°
var span = '' + $(item).data('filter-item-nm') + 'ìì ';
$('.opt-area').append(span);
var div = '';
div += '' + $(item).data('filter-item-nm') + 'ìì ';
div += '
';
$('.filter-footer > .list-option').append(div);
var arr = $(item).attr('id').split('-');
checkedIdList.push('itm-'+arr[1]+'-'+arr[2]);
checkedIdList.push('itmPop-'+arr[1]+'-'+arr[2]);
}
});
});
//MO : PFê³ ëí
$('#pfContainer').addClass('mo_ver2');
gridCol2();
itemInit();
var hashArr = location.hash.split('_');
if('#compare' == hashArr[0] && hashArr[1] != null){
var goodsList = hashArr[1].split('|');
var compDispClsfEnNm = $('#compDispClsfEnNm').val();
var dispClsfNo = 40030000;
skuAddedCompare(goodsList, compDispClsfEnNm, dispClsfNo);
}
/* s : KDP-42832[ë·ì»´, í¨ë· ì ì, ëí, EPP, ë±ì¸ê¸ëª°]PF íì ì í ì ì¸ í ê¸ ë²í¼ ì¶ê° */
// PC
$("label[for = 'toggle-check-on-pc']").click(function(){
/* íë§¤ì¤ ìí 보기 ë¹íì±í -> moí ê¸ ìíë ê°ì´ ë§ì¶°ì¤. íë§¤ì¤ íë ë³ìì Nì
í
*/
if($("#soldOutExceptYn").val() =='Y'){
$("#soldOutExceptYn").val("N");
}else{
$("#soldOutExceptYn").val("Y");
}
$("#toggle-check-on-mo").click();
itemInit();
});
// MO
$("label[for = 'toggle-check-on-mo']").click(function(){
/* íë§¤ì¤ ìí 보기 ë¹íì±í -> pcí ê¸ ìíë ê°ì´ ë§ì¶°ì¤. íë§¤ì¤ íë ë³ìì Nì
í
*/
if($("#soldOutExceptYn").val() =='Y'){
$("#soldOutExceptYn").val("N");
}else{
$("#soldOutExceptYn").val("Y");
}
$("#toggle-check-on-pc").click();
itemInit();
});
/* e : KDP-42832[ë·ì»´, í¨ë· ì ì, ëí, EPP, ë±ì¸ê¸ëª°]PF íì ì í ì ì¸ í ê¸ ë²í¼ ì¶ê° */
//PF LNB
additionalPfLnb();
});
$(document).ready(function() {
/* KDP-31922 [FO] ì¹ì ê·¼ì± ìí ë¹êµí기 ë° PD - 81 */
$('.ranking').find('li').attr('aria-hidden',false);
$(function () {
// ê°ê²© range slider
$('#slider-range-pf').slider({
range: true,
min: 1,
max: 89,
step: 1,
values: [1, 89],
slide: function(event, ui) {
$("#rangePrice").find(".min-range").text(fnComma(ui.values[0]) + "ë§ì");
$("#rangePrice").find(".max-range").text(fnComma(ui.values[1]) + "ë§ì");
//모ë°ì¼ì ê·¼ì± 221124-31p : aria-valuemin / aria-valuemax ê°ë¶ì¬
$('#slider-range-pf .ui-slider-handle:nth-of-type(1)').attr("aria-valuemin",fnComma(ui.values[0]));
$('#slider-range-pf .ui-slider-handle:nth-of-type(2)').attr("aria-valuemax",fnComma(ui.values[1]));
} ,
change: function(event, ui) {
$("#slider-range-pf").attr("data-omni",$( "#slider-range-pf" ).slider("values", 0)+"-"+$( "#slider-range-pf" ).slider("values", 1));
itemInit();
}
});
$("#rangePrice").find(".min-range").text(fnComma($( "#slider-range-pf" ).slider("values", 0)) + "ë§ì");
$("#rangePrice").find(".max-range").text(fnComma($( "#slider-range-pf" ).slider("values", 1)) + "ë§ì");
//모ë°ì¼ì ê·¼ì± 221124-31p : ë²í¼ìí ,í
ì¤í¸ ë¶ì¬
$('#slider-range-pf .ui-slider-handle').attr("aria-role","buttom");
$('#slider-range-pf .ui-slider-handle').attr("aria-label","buttom");
//모ë°ì¼ì ê·¼ì± 221124-31p : aria-labelê³¼ ì°ê²°ì ìí´ id ë¶ì¬
$('#slider-range-pf .ui-slider-handle:nth-of-type(1)').attr("id","leftRangeBtn");
$('#slider-range-pf .ui-slider-handle:nth-of-type(2)').attr("id","rightRangeBtn");
//모ë°ì¼ì ê·¼ì± 221124-31p : ë²í¼ ìì§ì´ê¸° ì ì aria-valuemin
$('#leftRangeBtn').attr("aria-valuemin",1);
$('#rightRangeBtn').attr("aria-valuemax",89);
// í ì¸ì¨ range slider
$('#slider-discount-pf').slider({
range: true,
min: 0,
max: 100,
step: 1,
values: [0, 100],
slide: function(event, ui) {
$("#rangeDiscount").find(".min-range").text(fnComma(ui.values[0]) + "%");
$("#rangeDiscount").find(".max-range").text(fnComma(ui.values[1]) + "%");
} ,
change: function(event, ui) {
$("#slider-discount-pf").attr("data-omni",$( "#slider-discount-pf" ).slider("values", 0)+"-"+$( "#slider-discount-pf" ).slider("values", 1));
itemInit();
}
});
$("#rangeDiscount").find(".min-range").text(fnComma($( "#slider-discount-pf" ).slider("values", 0)) + "%");
$("#rangeDiscount").find(".max-range").text(fnComma($( "#slider-discount-pf" ).slider("values", 1)) + "%");
});
$('#slider-range-pf .ui-slider-handle').draggable();
$('#slider-discount-pf .ui-slider-handle').draggable();
''
// s: KDP-60596 [FO][FNET] PF íì
ìì
// íì
x ë²í¼ ìì ë¡ ì¸í´ 'ë«ê¸°' ë²í¼ì¼ë¡ íì
ë«ê¸° script ì¶ê°
''
// e: KDP-60596 [FO][FNET] PF íì
ìì
});
//PF LNB ëëë§ ëë íì´ì§ liì active b_line í´ëì¤ ì¶ê°
function additionalPfLnb(){
var pathComp1 = window.location.href;
var pathComp2 = null;
$("ul.lnb-list.swiper-wrapper > .swiper-slide > a").each(function(){
pathComp2 = $(this).attr('href');
if(pathComp1 == pathComp2){
$(this).parent('li').addClass('active b_line');
}
})
}
var scroll = 0;
var checkedIdList = [];
function itemInit(sortType) {
var agent = navigator.userAgent.toLocaleLowerCase();
if(agent.indexOf('secapp') > -1 || agent.indexOf('SECTEST') > -1) {
$('#secAppYn').val("Y");
} else {
$('#secAppYn').val("N");
}
if(agent.indexOf('secios') > -1 || device.isIosApp) {
$('#secIosYn').val("Y");
}
$('#morePrd').prop('disabled', true);
$('#morePrd').hide();
// ì´ê¸°í ì²ë¦¬
if ($('.opt-area > span').length > 0) {
$('.box-option > :button').show();
$('.filter-footer > :button').show();
$('.box-result .reset-i').show();
$('#pfFilterArea_mo .btn-s.btn-type1').removeClass('disabled');
} else {
$('.box-option > :button').hide();
$('.filter-footer > :button').hide();
$('.box-result .reset-i').hide();
$('#pfFilterArea_mo .btn-s.btn-type1').addClass('disabled');
}
// 주ì ì¬ì 리
var queryString = '';
var isTvSel = "N";
var isAirconSel = "N";
var isFlipSel = "N";
var minMaxValList = [];
$('.opt-area > span').each(function(index, item) {
queryString += (queryString === '' ? '' : '+') + $(item).data('search-filter');
if($(item).data('min-max-val') != ''){
minMaxValList.push($(item).data('min-max-val'));
}
if($(item).data('search-filter') == 'tv'){
isTvSel = "Y";
}
// system-air-conditioner bespoke-air-conditioners
if($(item).data('search-filter') == 'system-air-conditioner' || $(item).data('search-filter') == 'bespoke-air-conditioners'){
isAirconSel = "Y";
}
if($(item).data('search-filter') == 'Signage/monitor'){
isFlipSel = "Y";
}
});
if (queryString != '') {
if(location.href.indexOf('&')> -1) {
if(queryString.indexOf('+')> -1) {
history.replaceState(null, null, '?' + queryString);
}else{
}
}else{
history.replaceState(null, null, '?' + queryString);
}
} else {
history.replaceState(null, null, location.href.substring(0, location.href.indexOf('?')));
}
if(isTvSel == "N" && $('.opt-area > span').length == 0){
$("#pfFilterArea .list-box>ul").find("li").each(function(index, item){
if($(item).find("input").data("search-filter") == "tv"){
isTvSel = "Y";
}
if($(item).find("input").data("search-filter") == "system-air-conditioner" || $(item).find("input").data("search-filter") == "bespoke-air-conditioners"){
isAirconSel = "Y";
}
if($(item).find("input").data("search-filter") == "Signage/monitor"){
isFlipSel = "Y";
}
})
}
if('memory-storage' == 'soho'){
/* ììê³µì¸ëª° PFíì´ì§ TVí¬ê² ìì보기 ìì´ì½ */
if(isTvSel == "Y"){
if(!$(".pf-top-cta").is(":visible")){
$(".pf-top-cta").show();
}
if($("input:checkbox[data-search-filter='tv']").prop("checked")) {
$("#a_tvRulerLayer").show();
} else {
$("#a_tvRulerLayer").hide();
}
}else{
if($(".pf-top-cta .pf-top-cta-inner .cover>a").length == 2 && !$("#a_airconPDF").is(":visible")) {
$(".pf-top-cta").hide();
}
$("#a_tvRulerLayer").hide();
}
/* ììê³µì¸ëª° PFíì´ì§ ìì´ì»¨ ì¶ê° ì¤ì¹ë¹ ìì´ì½ */
if(isAirconSel == "Y"){
if(!$(".pf-top-cta").is(":visible")){
$(".pf-top-cta").show();
}
if($("input:checkbox[data-search-filter='system-air-conditioner']").prop("checked") || $("input:checkbox[data-search-filter='bespoke-air-conditioners']").prop("checked")) {
$("#a_airconPDF").show();
} else {
$("#a_airconPDF").hide();
}
}else{
if($(".pf-top-cta .pf-top-cta-inner .cover>a").length == 2 && !$("#a_tvRulerLayer").is(":visible")){
$(".pf-top-cta").hide();
}
$("#a_airconPDF").hide();
}
/* ììê³µì¸ëª° PFíì´ì§ í립2 구매 ìë´ ìì´ì½ */
if(isFlipSel == "Y"){
if(!$(".pf-top-cta").is(":visible")){
$(".pf-top-cta").show();
}
if($("input:checkbox[data-search-filter='Signage/monitor']").prop("checked")) {
$("#a_filp2Buy").show();
} else {
$("#a_filp2Buy").hide();
}
}else{
if($(".pf-top-cta .pf-top-cta-inner .cover>a").length == 2 && !$("#a_filp2Buy").is(":visible")){
$(".pf-top-cta").hide();
}
$("#a_filp2Buy").hide();
}
}
// ê°ê²©ë²ì ì¶ê° (slider íí : ì¹ì ê·¼ì± ì´ìë¡ ì¬ì© ìí¨ 2023-09-19)
var minRangePrc = $('#rangePrice .min-range').html().replace(/ë§ì/g, '').replace(/,/g, '').toString();
var minPrc = $('#rangePrice').data('min-prc');
if (!isNaN(minRangePrc) && minRangePrc != minPrc && minRangePrc != '') {
queryString += (queryString === '' ? '' : '+') + 'min:' + minRangePrc;
}
var maxRangePrc = $('#rangePrice .max-range').html().replace(/ë§ì/g, '').replace(/,/g, '');
var maxPrc = $('#rangePrice').data('max-prc');
if (!isNaN(maxRangePrc) && maxRangePrc != maxPrc && maxRangePrc != '') {
queryString += (queryString === '' ? '' : '+') + 'max:' + maxRangePrc;
}
//í ì¸ì¨ë²ì ì¶ê°
var minRangeDiscountPrc = $('#rangeDiscount .min-range').html();
var maxRangeDiscountPrc = $('#rangeDiscount .max-range').html();
console.log("minRangeDiscountPrc : ", minRangeDiscountPrc)
if(typeof minRangeDiscountPrc != "undefined" && typeof maxRangeDiscountPrc != "undefined"){
minRangeDiscountPrc = minRangeDiscountPrc.replace(/%/g, '').replace(/,/g, '').toString();
maxRangeDiscountPrc = maxRangeDiscountPrc.replace(/%/g, '').replace(/,/g, '').toString();
var minDiscountPrc = $('#rangeDiscount').data('min-prc');
var maxDiscountPrc = $('#rangeDiscount').data('max-prc');
if (!isNaN(minRangeDiscountPrc) && minRangeDiscountPrc != minDiscountPrc && minRangeDiscountPrc != '') {
queryString += (queryString === '' ? '' : '+') + 'minDc:' + minRangeDiscountPrc;
}
if (!isNaN(maxRangeDiscountPrc) && maxRangeDiscountPrc != maxDiscountPrc && maxRangeDiscountPrc != '') {
queryString += (queryString === '' ? '' : '+') + 'maxDc:' + maxRangeDiscountPrc;
}
}
// ìí ì ë³´ ì¡°í¬(ajax)
$('#page').val('1');
// íë©´ ìí ê°¯ì ê³ì°
var calc_rows = g_rows;
scroll = 0;
var cookiePage = 0;
var pageScroll = sessionStorage.getItem('pageScroll');
var windowWidth = $(window).width();
var ehcacheYn = 'Y';
var soldOutExceptYn = $('#soldOutExceptYn').val();
if(pageScroll != undefined && pageScroll != ''){
var categoryNO = pageScroll.split('|||')[2];
if(categoryNO == '40030000' && (window.performance && window.performance.navigation.type === 2)){
ehcacheYn = 'N';
cookiePage = pageScroll.split('|||')[1];
calc_rows = calc_rows * cookiePage;
scroll = pageScroll.split('|||')[0];
sortType = pageScroll.split('|||')[3];
var gridType = pageScroll.split('|||')[4];
if(pageScroll.split('|||')[5].length > 0) {
checkedIdList = pageScroll.split('|||')[5].split(',');
}
soldOutExceptYn = pageScroll.split('|||')[6];
const $selected = $('#odrDeliveryCycleBtn').parent().find('.focused');
$selected.attr('aria-selected',false);
$selected.removeClass('focused');
//PC ì ë ¬ê¸°ì¤
const $newSelect = $('#optDeliveryCycle'+sortType);
$newSelect.attr('aria-selected',true);
$newSelect.addClass('focused');
if(gridType == '1'){
gridCol1();
}else if(gridType == '2'){
gridCol2();
}
$('#odrDeliveryCycleBtn').text($newSelect.children().text());
$('#odrDeliveryCycle > ul').attr('aria-activedescendant','optDeliveryCycle'+sortType);
//MO ì ë ¬ê¸°ì¤
const $sortTypeMo = $('#popOptDeliveryCycle'+sortType);
$('#filterSortType').val(sortType);
$('#sortItemButton').html($sortTypeMo.data('sort-nm')+' ');
if('50' == '10'){
$('#sortItemButton').attr('title', "ì ë ¬ìì");
}else{
$('#sortItemButton').attr('aria-label', $sortTypeMo.data('sort-nm'));
}
}
sessionStorage.removeItem('pageScroll');
}
if ( pfPrdCardAdv != null ) {
if (pfPrdCardAdv.cardTpCd == '10' ){
calc_rows = calc_rows - 2;
} else if(pfPrdCardAdv.cardTpCd == '20'){
calc_rows = calc_rows - 1;
}
}
$('#rows').val(calc_rows);
if (sortType == undefined || sortType === '') {
sortType = $('#filterSortType').val();
}
$("#soldOutExceptYn").val(soldOutExceptYn);
let url;
let showWaitFlag;
let type;
if($('#pfAcamaiUseYn').val()=='Y'){
url = "/sec/cxhr/pf/goodsList";
showWaitFlag = false;
type = 'GET'
}else{
url = "/sec/xhr/pf/goodsList";
showWaitFlag = true;
type = 'POST'
}
ajax.call({
data : {
searchFilter: queryString
, dispClsfNo: 40030000
, sortType: sortType
, page: $('#page').val()
, rows: $('#rows').val()
, minMaxValList : minMaxValList
, ehcacheYn : ehcacheYn
, soldOutExceptYn : $('#soldOutExceptYn').val() //
, pfFasterUseYn : $('#pfFasterUseYn').val()
, secApp : $("#secAppYn").val() == 'Y'
, secIos : $("#secIosYn").val() == 'Y'
, aiscCtgYn : $("#aiscCtgYn").val()
, tcPlantCode : $("#tcPlantCode").val()
}
, url : url
, type: type
, dataType : 'json'
, showWait : showWaitFlag
, done: function (data) {
goodsGA4.fnGA4viewItemList(data.products);
// ìì¹´ë§ì´ ì¬ì© ì¬ì´í¸ë personalizationìì ê°ì ¸ì¤ë wishGoods ì¬ì©
// BEST SELLER ë¶ë¶ í´ëì¤ë í¼ë¸ ë³ê²½ì ë°ëì ê²í íì!
if($('#pfAcamaiUseYn').val()=='Y'){
data.wishGoods = null;
}
// @ìì¸ê²ì ì¡°ê±´ (BEST SELLER ë¶ë¶ ë
¸ì¶ì ìí´ ì¶ê° - @Jinam.id_2020-11-02)
if(data.searchFiter.length > 0){
$(".ranking-area").hide();
}else{
$(".ranking-area").show();
$('.ranking > li').each(function(idx, item) {
var goodsId = $(item).children('input[name=goodsId]').val();
var btn = $(item).children('.btn-good');
if('10' == '10'){
btn.find('.svg-icon.default').show();
btn.find('.svg-icon.active').hide();
}
if(data.wishGoods != 'undefined' && data.wishGoods != null && data.wishGoods.length > 0){
for(var i=0; i .viewCtrl-area > .search-result').html('ê²ìê²°ê³¼ ' + fnComma(data.count) + 'ê° ');
$('#pfFilterArea_mo > .filter-footer > .btn-box > .btn-prd-more > .cnt').html(fnComma(data.count) + 'ê°');
$('.top-opt-detail-area > .opt-detail-inner > .box-result > span, .pf-prd-filter-area > .filter-header > .box-result > span ').html('ê²ì ê²°ê³¼' + fnComma(data.count) + ' ê°');
$('#totalCount').val(data.count);
// product card ì ê±°
$('.list-product > .list > li').remove();
// B2C product cardí ë°°ë ìì : íì¬ì´í¸ì ìì¹ ë¤ë¦
// if(true){
// $('.list-product > .banner-list ').remove();
// }
// KDP-72192 [B2C][FO]ë¹ì¼ë°°ì¡ ë¹ì¼ì¤ì¹ PF ì¦ìë°ì
sameIstAvailTimeVO = data.sameIstAvailTimeVO;
sameDlvrAvailTimeVO = data.sameDlvrAvailTimeVO;
if (!isSameDayAvailableTime(sameIstAvailTimeVO)) {
$('#pfFilterArea > ul > li > div.list-box input[data-search-filter="sameIst"]').prop('disabled', true);
$('#pfFilterArea_mo > div > ul > li > div.list-box input[data-search-filter="sameIst"]').prop('disabled', true);
}
if (!isSameDayAvailableTime(sameDlvrAvailTimeVO)) {
$('#pfFilterArea > ul > li > div.list-box input[data-search-filter="sameDlvr"]').prop('disabled', true);
$('#pfFilterArea_mo > div > ul > li > div.list-box input[data-search-filter="sameDlvr"]').prop('disabled', true);
}
if(data.products != null && data.products.length > 0){
var sortBtn = "sort";
// init > ì ë¶ ìë¡ ìì±íëê±°ë©´ pfSwiperArray ë°°ì´ ë¹ìì£¼ê³ setPfSwiperì¤í
pfSwiperArray = [];
appendProductCard(data.products, sortBtn, data.wishGoods);
/* PF ëª©ë¡ ëì´ ì¡°ì */
setTimeout((function () {
pfListHeight();
}), 1500);
//ì¹ì ê·¼ì± - ê³µíµì½ë : GOODS_WA_UNUSED_ST, ê¸°ë¥ on/offë¡ ê´ë¦¬. 2024-06-07
setTimeout((function () {
moveFirstImg();
}), 2000);
}else{
appendNoList();
}
if (sortType != undefined || sortType != '') {
$('li[data-sort-type='+sortType+ ' ]').attr('aria-selected', true);
}
if(scroll > 0){
$("#page").val(cookiePage);
}
//ë¤ë¡ê°ê¸° ì ë보기ë²í¼ íì¬ íì´ì§ íì
if(cookiePage != 0){
$('#presentPageCount').text(cookiePage);
}
// checked ì²ë¦¬
if(checkedIdList.length > 0){
$('.list-filter').find('input:checkbox').each(function(idx, item) {
$(item).prop('checked', false);
});
for(var i=0; i 0 ? '(' + cnt + ')' : '';
var filterCntLength = $(".btn-filter-cnt").length-1;
var count = index +1;
if(filterNmFlag == true){
filterNmUpd[index] = $(item).parent().find('button').data('filter-nm');
if(index == filterCntLength){
filterNmFlag = false;
}
}
$(".filterChkCnt_"+count).html(filterNmUpd[index] + cntTxt);
});
// ì 목 ì 리
$('a.btn-filter').each(function(index, item) {
var cnt = $(item).parent().find('input:checkbox:checked').length;
var addTxt = cnt > 0 ? '(' + cnt + ')' : '';
//2024-06-19 ì¹ì ê·¼ì±
var text = 'ì´ë¦¼ '
$(item).html($(item).data('filter-nm') + addTxt + text);
cnt > 0 ? $(item).addClass("selected-itm") : $(item).removeClass("selected-itm");
});
// ì 목 ì 리 mo
$('.moListFilter').each(function(index, item) {
var moCnt = $(item).find('input:checkbox:checked').length;
var moAddTxt = moCnt > 0 ? '(' + moCnt + ')' : '';
//B2C MO ìì¸íí°
if($($('.detailFilter.idx').get(index)).find(".cnt").length > 0){
//$('.detailFilter > .cnt').eq(index).text(moAddTxt);
$($('.detailFilter.idx').get(index)).find(".cnt").text(moAddTxt);
if(moAddTxt != ''){
$('.detailFilter.idx').eq(index).addClass('active');
}else{
$('.detailFilter.idx').eq(index).removeClass('active');
}
}
});
if($('#pfAcamaiUseYn').val()=='Y'){
var pfGoodsList = [];
if(!!data.products){
for(var i=0 ; i 0){
personalizeProductCard(data);
}
}
});
}
}
}
});
}
function goMembershipJoin() {
// window.open('https://membership.samsung.com/sec/lnc/KoFamNRegister?CiTokn=4b7db13b3c654b80a5f2d412d782993026fc134823312481657e4c36f0bf6330&Fnm=8241445b72beeb8d2e330bc198a4896a0953dff4dd28ced398bcce6c4205a9de', '_blank', "width=630,height=720");
var stGbCd = '10';
var stId = '1';
//ë·ì»´ê³¼ í¨ë· 멤ë²ì ê°ì
URL ë¶ê¸° ì²ë¦¬
if(stGbCd == '10') {
location.href = '/sec/' + "membership/membershipJoin/";
} else if(stGbCd == '70'){
if('266' == stId){
window.open('/sec/member/indexSaLogin/','','width=640, height=858, scrollbars=yes');
}else{
location.href = '/sec/' + "membership/";
}
} else if(stGbCd == '80' && stId == 122){
location.href = '/sec/' + "mypage/info/mySAMembership/";
} else if(stGbCd == '20' && stId == 2) {
window.open('/member/indexSaLogin/','','width=640, height=858, scrollbars=yes');
} else if (stGbCd == '30' && stId == 3) {
window.open('','','width=640, height=508, scrollbars=yes');
} else {
location.href = '/sec/' + "membership/point";
}
}
var pfPrdCardAdv;
var pfBannerAdv;
var pfBannerCounsel;
''
''
pfPrdCardAdv = {
bnrText: '',
bnrImgAltText: 'ì¤ë§í¸í ì¼íì ìí 구매ê°ì´ë A to Z #ë´ê² ë§ë SSD 찾기 #매ì§ì
ìíí¸ì¨ì´',
bnrImgPath: '//images.samsung.com/kdp/display_banner/pc/5162/ec8c59e7-6726-438e-ba88-4e0f7cb733fb.jpg',
bnrMobileImgPath: '//images.samsung.com/kdp/display_banner/mobile/5162/a7948fbe-6bf7-4154-a24a-ad1837c6153c.jpg',
bnrMobileImgPath2: '//images.samsung.com/kdp/display_banner/mobile/5162/30bd0917-43b8-48c0-ab4c-72f367592835.jpg',
dispCornTpCd: '22',
cardTpCd: '20',
showPstCd: '5',
goodsPath: '',
mdlCode: '',
mdlNm: '',
linkUrl: 'https://www.samsung.com/sec/memory-storage'
};
''
''
''
''
''
''
pfBannerAdv = {
bnrText: '',
bnrImgAltText: 'ê²°ì íí1. ì ì©ì¹´ë 7% ê²°ì ì¼í ì¸/ìºìë°± ìµë 100ë§ì. ê²°ì íí2. ì¹´ëì¬ë³ 무ì´ì í ë¶. ì¹´ëì¬ë³ 무ì´ì í ë¶ ì ë³´ë '주문/ê²°ì 'íì´ì§ìì íì¸ ê°ë¥. *ê²°ì ì¼í ì¸/ìºìë°±ì íí ëì ê°ì¸ì ì©ì¹´ë ë³´ì íìì íí´ íì ìê´ ìì´ ì¹´ë íì ê¸°ì¤ ì ëì ìµë 100ë§ì íëë¡ ì ê³µ *ë²ì¸/ì²´í¬/ì ë¶/ì¶©ì /기íí¸ì¹´ë ì ì¸',
bnrImgPath: '//images.samsung.com/kdp/display_banner/pc/23418/0ff68142-cf84-47d4-b274-1d507a0ebd1c.png',
bnrMobileImgPath: '//images.samsung.com/kdp/display_banner/mobile/23418/17d93c17-a4cc-4c09-8ff5-bf84320ab84b.png',
dispCornTpCd: '23',
cardTpCd: '',
showPstCd: '2',
goodsPath: '',
mdlCode: '',
mdlNm: '',
linkUrl: 'https://www.samsung.com/sec/eventList/benefitzone/'
};
''
''
''
function fnetPfLayerPopOpen(){
var fnetPfLayerPopCookie = $.cookie('fnetPfLayerPop140030000');
if(fnetPfLayerPopCookie != 'true'){
$("#fnetPopupButton").trigger('click');
/* KDP-21609 [FO][B2B] 모ë°ì¼ ì¹ì ê·¼ì±_p54 LMJ START */
$("#fnetPfLayerPopup").focus();
/* KDP-21609 [FO][B2B] 모ë°ì¼ ì¹ì ê·¼ì±_p54 LMJ END */
}
}
function notToSee() {
var chkNotSee = $("#chk-not-see").prop("checked");
if(chkNotSee){
$.cookie('fnetPfLayerPop140030000', "true", {expires:1, path:'/'});
}
$("#fnetPfLayerPopupCloseBtn").trigger('click');
}
// PF ì´ë¯¸ì§ ì¤ìì´í ì²´í¬ : ì´ë¯¸ì§ 1ê°ì¸ ê²½ì° ëë 1,2ë²ì§¸ ì´ë¯¸ì§ gifì¸ ê²½ì° false ë¦¬í´ í ì ëë©ì´ì
미ì ì©
function pfImgSwpYnChk(img1, img2){
var chkYn = 'Y';
if(img1 != null && img2 == null) { // ì´ë¯¸ì§ê° íëì¸ ê²½ì° false
chkYn = 'N';
}else if(img1 != null && img1.indexOf(".gif") > -1){ // 첫ë²ì§¸ ì´ë¯¸ì§ê° gifì¸ ê²½ì° false
chkYn = 'N';
}else if(img2 != null && img2.indexOf('.gif') > -1){ // ëë²ì§¸ ì´ë¯¸ì§ê° gifì¸ ê²½ì° false
chkYn = 'N';
}else{
chkYn = 'Y';
}
return chkYn;
}
// KDP-72192 [B2C][FO]ë¹ì¼ë°°ì¡ ë¹ì¼ì¤ì¹ PF ì¦ìë°ì
function isSameDayAvailableTime(sameDayAvailTimeVO) {
if (!sameDayAvailTimeVO) return false;
if (!sameDayAvailTimeVO.usrDfn1Val || !sameDayAvailTimeVO.usrDfn2Val || !sameDayAvailTimeVO.usrDfn4Val) return false;
const startTime = sameDayAvailTimeVO.usrDfn1Val;
const endTime = sameDayAvailTimeVO.usrDfn2Val;
const availableDays = sameDayAvailTimeVO.usrDfn4Val;
const now = new Date();
const currentFullTime = toTimeString(now, 'Y');
const currentTime = currentFullTime.slice(8, 14);
const currentDay = now.getDay() === 0 ? 1 : now.getDay() + 1;
if (!availableDays.includes(currentDay.toString())) {
return false;
}
return currentTime >= startTime.replace(/:/g, '') && currentTime <= endTime.replace(/:/g, '');
}