1/2 saniye
1s
1/2 saniye
2 saniye
1/2 saniye
4 saniye
1/2 saniye
8'ler
0){
$('.aksesuarTabTitle').removeClass('hideThis');
}
$('.aksesuarlar').appendTo('.aksesuarContent');
if ($(window).width() < 768) {
$('.detaySag').appendTo('#detaySag');
}
$('.digerKit').appendTo('#digerKitContent');
$('#fbShareBtn').click(function () {
var shareUrl = 'https://www.facebook.com/sharer/sharer.php?u=' + encodeURIComponent(location.href);
var winOpts = ['width=590', 'height=430', 'status=no', 'resizable=yes', 'toolbar=no', 'menubar=no', 'scrollbars=yes'].join(',');
window.open(shareUrl, 'Share on Facebook', winOpts);
});
$('#whatShareBtn').click(function () {
var shareUrl = 'whatsapp://send?text=' + encodeURIComponent(location.href);
var winOpts = ['width=590', 'height=430', 'status=no', 'resizable=yes', 'toolbar=no', 'menubar=no', 'scrollbars=yes'].join(',');
window.open(shareUrl, 'Share on Whatsapp', winOpts);
});
$('.tamamlayiciUrunler').appendTo('.birlikteAl');
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)) {
if ($(window).width() < 769) {
$('#productRight').appendTo('.mobileRight');
}
}
$('.tabTitle').click(function(){
$(this).toggleClass('active').next().slideToggle();
$('.tabTitle').not($(this)).removeClass('active');
});
$('#odemeler').on('click', function(){
if(!$(this).hasClass('loaded')){
var url = $(this).attr('data-href');
$.get(url, function(data){
$('#odeme-wrapper').append(data);
});
$(this).addClass('loaded');
}
});
$('#tavsiyeet').on('click', function(){
if(!$(this).hasClass('loaded')){
var url = $(this).attr('data-href');
$.get(url, function(data){
$('#tavsiye-wrapper').append(data);
});
$(this).addClass('loaded');
}
});
$('#tabBtn li').click(function () {
if (!$(this).hasClass('loaded')) {
var tabIndex = $(this).index();
loading.show($('#tabPanel > li:eq(' + tabIndex + ')'));
if ($(this).attr('data-href')) {
$.get($(this).attr('data-href'), function (content) {
loading.hide($('#tabPanel > li:eq(' + tabIndex + ')'));
setTimeout(function () {
$('#tabPanel').children('li:eq(' + tabIndex + ')').html(content);
lazyControl('lazy');
}, 250);
});
} else if ($(this).hasClass('json')) {
var jsonID = $('#tabPanel > li:eq(' + tabIndex + ')').attr('id');
$('#' + jsonID).angularTemplate();
loading.hide($('#' + jsonID));
} else {
loading.hide($('#tabPanel > li:eq(' + tabIndex + ')'));
}
$(this).addClass('loaded')
}
});
$("#adviceBtn").click(function () {
$("#adviceTab").trigger('click');
tabScroll('#adviceTab');
});
$(document).on('click', '.commentPopupBtn', function () {
showCommentForm($(this).attr('data-id'));
});
/*iPhone option[disabled] bugfix*/
if((navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/iPhone/i)) && $('select#subPro2').length){
var variant_two_options = $('select#subPro2').children('option');
$('#productRight .variantWrapper select#subPro1').change(function(e){
var _self = $(this),
active_ids = variant.active_ids['one_' + _self.find('option:selected').attr('data-id')];
$('#subPro2').children('option').not('[value=""]').remove();
$.each(variant_two_options, function(i, item){
if($.inArray($(item).attr('data-id'), active_ids) !== -1){
$('#subPro2').append($(item));
}
}).promise().done(function(){
if($('#subPro2 option:selected').length){
$('#subPro2 option:selected').last().trigger('change');
} else {
$('#subPro2 option').first().trigger('change');
}
});
});
}
if (typeof isNewJsOptimizer != 'undefined' && isNewJsOptimizer === true) {
function changeSubProImg(parent, subIndex) {
if(!/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)){
$('.zoomContainer').remove();
$('#productLeft img').removeData('elevateZoom');
$('#zoomImage' + subIndex).elevateZoom({
/*zoomType: "inner",*/ /* zoomType: "inner" ise "scrollZoom" pasif olmak zorunda */
cursor: "crosshair",
easing: true,
scrollZoom: true,
zoomWindowPosition: "productRight",
zoomWindowFadeIn: 500,
zoomWindowFadeOut: 750
});
}
}
cartControl = true;
var productImage = $('#productImage');
productImage.slide({
isAuto: productImage.data('auto-slide') == 'true' ? true : false,
slideCtrl: {
showCtrl: true,
wrapCtrl: '#imageControl',
nextBtn: '#nextImage',
prevBtn: '#prevImage'
},
changeOnMouse: productImage.data('change-mouse') == 'true' ? true : false,
slidePaging: {
showPaging: true,
wrapPaging: '#productThumbs'
},
changeFn: function (e) {
if(productImage.data('magnifier') == '1')
changeSubProImg('#productImage', e);
}
});
$('#productThumbs').slide({
slideType: 'carousel',
isAuto: false,
slideMove: {
slideDirection: 'vertical',
visibleItem: 5
},
slideCtrl: {
showCtrl: true,
wrapCtrl: '#thumbControl',
nextBtn: '#nextThumb',
prevBtn: '#prevThumb'
}
});
$('#tabPanel').slide({
isAuto: false,
touchEnabled: false,
slidePaging: {
showPaging: true,
wrapPaging: '#tabBtn'
}
});
$('a[rel="external"]').lightbox();
if(!/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) && $('#zoomImage0').length && productImage.data('magnifier') == '1'){
$('.zoomContainer').remove();
$('#productLeft img').removeData('elevateZoom');
$('#zoomImage0').elevateZoom({
/*zoomType: "inner",*/ /* zoomType: "inner" ise "scrollZoom" pasif olmak zorunda */
cursor: "crosshair",
easing: true,
scrollZoom: true,
zoomWindowPosition: "productRight",
zoomWindowFadeIn: 500,
zoomWindowFadeOut: 750
});
}
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)) {
$('#tabBtn li').not('.no-scroll').click(function () {
$('html, body').animate({
scrollTop: $(this).offset().top - 20
}, 500);
});
}
if(typeof $("#productThumbs li:eq(0) span.imgInner img").attr("alt") != 'undefined') {
$(".lb-image").attr("alt", $("#productThumbs li:eq(0) span.imgInner img").attr("alt").replace(' - Thumbnail',''));
}
if ($('.variantMoreBtn').length >= 1) {
$('.variantList').each(function () {
if ($(this).find('a').length < 5) {
$(this).next().remove();
}
});
$('.variantMoreBtn').click(function () {
$(this).prev().toggleClass('active');
});
}
$('#fbShareBtn').click(function () {
var shareUrl = 'https://www.facebook.com/sharer/sharer.php?u=' + encodeURIComponent(location.href);
var winOpts = ['width=590', 'height=430', 'status=no', 'resizable=yes', 'toolbar=no', 'menubar=no', 'scrollbars=yes'].join(',');
window.open(shareUrl, 'Share on Facebook', winOpts);
});
$('#gpBtn').click(function () {
var shareUrl = 'https://plus.google.com/share?url=' + encodeURIComponent(location.href);
var winOpts = ['width=525', 'height=430', 'status=no', 'resizable=yes', 'toolbar=no', 'menubar=no', 'scrollbars=yes'].join(',');
window.open(shareUrl, 'Share on Google', winOpts);
});
$.get('/srv/campaign-v2/campaign/get-list-by-type/product/26239', function(result){
var campaigns = result;
if(campaigns.CAMPAIGN_LIST.length > 0){
$('#cmpList').removeClass('d-none');
$.each(campaigns.CAMPAIGN_LIST, function(i){
var cmpHtml = '' +
'
' +
'
' + this.TITLE + '
' +
'
' + this.DESCRIPTION + '
' +
'
' +
'
';
$('#cmps').append(cmpHtml);
});
}
});
}
});
function commentReady(json) {
$('.voteComment').click(function () {
var prId = $(this).attr('data-product-id');
var cId = $(this).attr('data-comment-id');
var vote = $(this).attr('data-vote');
$.ajax({
type: 'POST',
url: '/srv/service/product-detail/vote-comment/' + cId + '/' + vote,
dataType: 'json',
success: function (result) {
if (result.status) {
$('#product-comments').attr('data-url', '/srv/service/product-detail/comments/' + prId + '/3');
$('#product-comments').angularTemplate();
} else if (result.key != '') {
var element = $('#newComment').find('#' + result.key);
if (element.length > 0) {
tooltip.show(element, result.statusText, 2000, 'btn-danger');
var pos = element.offset().top - 100;
$('html, body').animate({
scrollTop: pos
}, 800);
}
}
}
});
});
$('.commentForm').click(function () {
$('#product-comments').attr('data-url', '/srv/service/product-detail/comments/' + json.PRODUCT_ID + '/1');
$('#product-comments').angularTemplate();
});
$('.saveComment').click(function () {
var prId = json.PRODUCT_ID;
var fileRules = {
extensions: ["image/jpeg", "image/png"],
size: 8388608
};
var formData = new FormData();
formData.append('prId', prId);
formData.append('rate', $("#rate").val());
formData.append('title', $("#title").val());
formData.append('text', $("#text").val());
formData.append('displayName', $("[name='displayName']:checked").val());
if ($('#newComment #file').length > 0) {
var fileDom = $('#newComment #file');
if (fileDom.val() !== '') {
for (var i=0; i fileRules.size) {
Message.debug('Resim dosya boyutu fazla (max. 2MB)');
return false;
}
if (fileRules.extensions.indexOf(file.type) === -1) {
Message.debug('Sadece resim formatları ekleyebilirsiniz');
return false;
}
formData.append('image[]', file);
}
}
}
T_Button.dom = $(".saveComment");
T_Button.loadingText = LANG.get('waiting');
T_Button.lock();
$.ajax({
type: 'POST',
url: '/srv/service/product-detail/comment/' + prId,
processData: false,
contentType: false,
data: formData,
dataType: 'json',
success: function (result) {
T_Button.unlock();
if (result.status) {
$('#product-comments').attr('data-url', '/srv/service/product-detail/comments/' + prId + '/2');
$('#product-comments').angularTemplate();
} else if (result.key != '') {
var element = $('#newComment').find('#' + result.key);
if (element.length > 0) {
tooltip.show(element, result.statusText, 2000, 'btn-danger');
var pos = element.offset().top - 100;
$('html, body').animate({
scrollTop: pos
}, 800);
}
}
}
});
});
$('.comment_images a').lightbox();
}
var isNewJsOptimizer = true;
function zoomCallback() {
}
function lightCallback() {
var img = $('#lightContent img');
img.on('load', function() {
var contentHeight = $('#lightContent img').height();
var contentWidth = $('#lightContent img').width();
setTimeout(function() {
var maxH = $('.pWin:last').height();
if (contentHeight > maxH) {
$('.pWin:last').addClass('overflow').width(contentWidth + 10);
}
}, 500);
});
}
let d = new Date();
let ye = new Intl.DateTimeFormat('en', { year: 'numeric' }).format(d);
let mo = new Intl.DateTimeFormat('en', { month: 'numeric' }).format(d);
let da = new Intl.DateTimeFormat('en', { day: '2-digit' }).format(d);
var cargoTimeZone = mo +'/' + da +'/'+ ye +' 16:00:00';
$('#clock').countdown(cargoTimeZone)
.on('update.countdown', function(event) {
var format = '%H:%M:%S';
if(event.offset.totalDays > 0) {
format = format;
}
if(event.offset.weeks > 0) {
format = format;
}
$(this).html(event.strftime(format));
})
.on('finish.countdown', function(event) {
$('.ProductCargoTime span').html('Şimdi sipariş ver, yarın kargoya verelim. ')
.parent().addClass('disabled');
});
Kategoride Çok Satılan Ürünler