PageSourceSearch

https://www.softtr.com/js/products.js?v=5.03.01.52&tv=

js softtr.com collected 2026-10-01 14:11:51 UTC 20,074 bytes, 839 lines download raw bytes

1function ProductsVitrin(lang){
2
3$.ajax({
4
5type:'GET',
6url:'../../controller/ProductsController.php?action=productsvitrin&lang='+lang,
7success : function(rtrn){
8
9$('div#products-index-box').html(rtrn);
10$('div#products-index-box').fadeIn(200);
11
12}
13
14});
15
16}
17
18function ProductsMostSales(lang){
19
20$.ajax({
21
22type:'GET',
23url:'../../controller/ProductsController.php?action=productsmostsales&lang='+lang,
24success : function(rtrn){
25
26$('div#products-index-box').html(rtrn);
27$('div#products-index-box').fadeIn(200);
28
29}
30
31});
32
33}
34
35function SubCategoriesOpen(id , lang){
36
37$.ajax({
38
39type:'GET',
40url:'../../controller/ProductsController.php?action=productssubcategories&id='+id+'&lang='+lang,
41success : function(rtrn){
42
43$('div#products-left-box-sub'+id).html(rtrn);
44$('div#products-left-box-sub'+id).slideToggle(110);
45
46}
47
48});
49
50}
51
52function TaksitSecenekleri(id , price , lang){
53
54$.ajax({
55
56type:'GET',
57url:'../../controller/ProductsController.php?action=taksitsecenekleri&id='+id+'&price='+price+'&lang='+lang,
58success : function(rtrn){
59
60$('div#window').html(rtrn);
61$('div#window').fadeIn(200);
62
63}
64
65});
66
67}
68
69
70function getBank(id,total){
71
72$.ajax({
73
74type:'GET',
75url:'../../controller/ProductsController.php?action=getbank&id='+id+'&total='+total,
76success : function(rtrn){
77
78$('div#bankDetail').html(rtrn);
79$('div#bankDetail').fadeIn(200);
80
81}
82
83});
84
85}
86
87
88function prComment(id,lang){
89	
90	$("div#loading_comment").show(0);
91	$("input#button_comment").hide(0);
92				
93	$.ajax({
94	
95	type:'POST',
96	url:'../../controller/ProductsController.php?action=prcomment&id='+id+'&lang='+lang,
97	data:$('#prcommentform').serialize(),
98	success : function(rtrn){
99	
100	//alert(rtrn);
101	
102	rtrn = JSON.parse(rtrn);
103			
104			
105			/*
106			var error = rtrn.Message;
107				document.getElementById('errormsg').innerHTML = error;
108				$('#error').fadeIn(100);
109				$("div#loading_comment").hide(0);
110				$("input#button_comment").show(0);
111				*/
112				
113		if(rtrn.Status!='ok'){
114
115		var error = rtrn.Message;
116		document.getElementById('errormsg').innerHTML = error;
117		$('#error').fadeIn(100);
118		$("div#loading_comment").hide(0);
119		$("input#button_comment").show(0);
120
121		}
122		
123		if(rtrn.Status=='ok'){
124		var error = rtrn.Message;
125		document.getElementById('successmsg').innerHTML = error;
126		//$('#success').fadeIn(100);
127		$("div#loading_comment").hide(0);
128		$("input#button_comment").show(0);
129		$("div#commentsuccess").fadeIn(0);
130		}
131				
132		
133	}
134	
135	});
136	
137	}
138	
139	function prQuestion(id,lang){
140	
141		$("div#loading_comment").show(0);
142		$("input#button_comment").hide(0);
143
144		$.ajax({
145			type:'POST',
146			url:'../../controller/ProductsController.php?action=prquestion&id='+id+'&lang='+lang,
147			data:$('#prquestionform').serialize(),
148			success : function(rtrn){
149				
150			//alert(rtrn);	
151				
152			rtrn = JSON.parse(rtrn);
153
154				if(rtrn.Status!='ok'){
155				var error = rtrn.Message;
156				document.getElementById('errormsg').innerHTML = error;
157				$('#error').fadeIn(100);
158				$("div#loading_comment").hide(0);
159				$("input#button_comment").show(0);
160				}
161				if(rtrn.Status=='ok'){
162				var error = rtrn.Message;
163				document.getElementById('successmsg').innerHTML = error;
164				$("div#loading_comment").hide(0);
165				$("input#button_comment").show(0);
166				$("div#commentsuccess").fadeIn(0);
167				}
168			}
169		});
170	}
171	
172	function star(id , star){
173	
174	$.ajax({
175	
176	type:'GET',
177	url:'../../controller/ActionController.php?action=prstar&id='+id+'&star='+star,
178	success : function(rtrn){
179	
180	alert(rtrn);
181	
182	if(rtrn=='ex2'){
183	var error = 'Bu ürün için daha önce oy kullanmıştınız. İlginiz için teşekkür ederiz.';
184	document.getElementById('errormsg').innerHTML = error;
185	$('#error').fadeIn(100);
186	}
187	
188	if(rtrn=='ex3'){
189	var error = 'İşlem sırasında bir sorun oluştu. Sorun devam ederse lütfen bizimle irtibata geçiniz.';
190	document.getElementById('errormsg').innerHTML = error;
191	$('#error').fadeIn(100);
192	}
193	
194	if(rtrn=='ok'){
195	var error = 'Ürünü oyladığınız için teşekkür ederiz.';
196	document.getElementById('errormsg').innerHTML = error;
197	$('#error').fadeIn(100);
198	}
199	
200	}
201	
202	});
203	
204	}
205	
206	function FavorilerimeEkle(id , lang){
207	
208	$.ajax({
209	
210	type:'GET',
211	url:'../../controller/ActionController.php?action=addfavori&id='+id+'&lang='+lang,
212	success : function(rtrn){
213	
214	//alert(rtrn);
215	
216		rtrn = JSON.parse(rtrn);
217
218		if(rtrn.Status!='ok'){
219
220		var error = rtrn.Message;
221		document.getElementById('errormsg').innerHTML = error;
222		$('#error').fadeIn(100);
223		$("div#loading").hide(0);
224		$("input#button").show(0);
225
226		}
227		
228		if(rtrn.Status=='ok'){
229		var error = rtrn.Message;
230		document.getElementById('successmsg').innerHTML = error;
231		$('#success').fadeIn(100);
232		$("div#loading").hide(0);
233		$("input#button").show(0);
234		}
235
236	}
237	
238	});
239	
240	}
241	
242	function FavoriKaldir(product , lang){
243		
244		$('div#sortingloading').fadeIn(400);
245		
246		$.ajax({
247			
248			type:'GET',
249			url:'../../controller/ActionController.php?action=deletefavori&product='+product+'&lang='+lang,
250			success : function(rtrn){
251				
252				rtrn = JSON.parse(rtrn);
253				if(rtrn.Status!='ok'){
254
255				var error = rtrn.Message;
256				document.getElementById('errormsg').innerHTML = error;
257				$('#error').fadeIn(100);
258				$("div#loading").hide(0);
259				$("input#button").show(0);
260
261				}
262				
263				if(rtrn.Status=='ok'){
264				var error = rtrn.Message;
265				document.getElementById('successmsg').innerHTML = error;
266				$('div#sortingloading').hide(0);
267				$('div#favori'+product).slideUp(50);
268				}
269				
270			}
271			
272		});
273		
274	}
275	
276function productNewsVariant(lang , id , Page_, variant){
277	let msg = variant+' seçeneği stoğa eklendiğinde bilgilendirilmek istiyorum.';
278  	productnews_(lang , id , Page_);
279    const interval = setInterval(function () {
280        const textarea = document.querySelector('textarea[name="msg"]');
281        if (textarea) {
282            textarea.value = msg;
283            clearInterval(interval);
284        }
285    }, 100);
286
287}
288	
289function productnews_(lang , id , Page_){
290
291$('div#sortingloading').fadeIn(400);
292
293$.ajax({
294
295type:'GET',
296url:'../../controller/ProductsController.php?action=productnews&id='+id+'&lang='+lang,
297success : function(rtrn){
298
299$('div#window-news').html(rtrn);
300$('div#window-news').fadeIn(200);
301$('div#sortingloading').fadeOut(0);
302
303}
304
305});
306
307}
308
309function ProductNewsForm(lang , id , Page_){
310
311$('div#sortingloading').fadeIn(400);
312
313$.ajax({
314
315type:'POST',
316url:'../../controller/ActionController.php?action=productnews&id='+id+'&lang='+lang,
317data:$('#ProductNewsForm').serialize(),
318success : function(rtrn){
319
320//alert(rtrn);
321
322rtrn = JSON.parse(rtrn);
323
324if(rtrn.Status!='ok'){
325
326		var error = rtrn.Message;
327		document.getElementById('errormsg').innerHTML = error;
328		$('#error').fadeIn(100);
329		$('div#sortingloading').hide(0);
330
331
332		}
333		
334		if(rtrn.Status=='ok'){
335		var error = rtrn.Message;
336		document.getElementById('successmsg').innerHTML = error;
337		$('#success').fadeIn(100);
338		$('div#sortingloading').hide(0);
339		}
340
341}
342
343});
344
345}
346	
347function paging(catid,lastid,lastprice,listType,lang,q){
348   
349   $.ajax({
350   
351   type:'GET',
352   url:'../../controller/ProductsController.php?action=paging&catid='+catid+'&lastid='+lastid+'&lastprice='+lastprice+'&listtype='+listType+'&lang='+lang+'&q='+q,
353   success : function(rtrn){
354   
355   //alert(rtrn);
356   
357   $('a#loadpaging'+lastid).fadeOut(0);
358   $('div#loadpaging'+lastid).html(rtrn);
359   $('div#loadpaging'+lastid).fadeIn(200);
360   
361   }
362   
363   });
364	
365	}
366	
367function BedenTablosu(id){
368
369$.ajax({
370
371type:'GET',
372url:'../../controller/ProductsController.php?action=bedentablosu&id='+id,
373success : function(rtrn){
374
375$('div#window').html(rtrn);
376$('div#window').fadeIn(200);
377
378}
379
380});
381
382}
383
384function googleYorumlari(){
385	$('html, body').animate({
386    scrollTop: $("#googleYorumlari").offset().top
387    }, 700);
388}
389
390function Yorumlar(){
391		$('div#yorumlar').fadeIn(0);
392		$('html, body').animate({
393        scrollTop: $("#yorumlar").offset().top
394    }, 700);
395		ProductTabsComments();
396	}
397	
398function Yorumlar_bs(){
399
400		$( "#comments-tab" ).trigger( "click" );
401		$('html, body').animate({
402			scrollTop: $("#comments-tab").offset().top
403		}, 700);
404			
405	}
406	
407function Yorumlar_bs_new(){
408	$('html, body').animate({
409			scrollTop: $("#urun-detay-soru-baslik").offset().top
410		}, 700);
411}
412	
413function yorumYapNew(){
414	$('div#urun-detay-yorum-form-new').slideToggle();
415}
416
417function soruSorNew(){
418	$('div#urun-detay-soru-form-new').slideToggle();
419}
420
421function tumOzelliklerAcikFormat(){
422		$('html, body').animate({
423        scrollTop: $("#tumOzelliklerAcikFormat").offset().top
424    }, 700);
425}
426	
427	
428function VitrinCokSatanlar(lang){
429	
430	$('div#sortingloading').fadeIn(400);
431	
432	$.ajax({
433		
434		type:'GET',
435		url:'../../controller/ProductsController.php?action=vitrincoksatanlar&lang='+lang,
436		success : function(rtrn){
437			
438			$('div#Vitrin').html(rtrn);
439			$('div#Vitrin').fadeIn(0);
440			$('div#sortingloading').hide(0);
441			document.getElementById("vitrincoksatanlar").style.background = "#f27a1a";
442			document.getElementById("vitrinenyeniler").style.background = "#4c464f";
443			document.getElementById("vitrinindirimdekiler").style.background = "#4c464f";
444		}
445		
446		
447	});
448}
449
450function VitrinIndirimdekiler(lang){
451	
452	$('div#sortingloading').fadeIn(400);
453	
454	$.ajax({
455		
456		type:'GET',
457		url:'../../controller/ProductsController.php?action=vitrinindirimdekiler&lang='+lang,
458		success : function(rtrn){
459			
460			$('div#Vitrin').html(rtrn);
461			$('div#Vitrin').fadeIn(0);
462			$('div#sortingloading').hide(0);
463			document.getElementById("vitrinindirimdekiler").style.background = "#f27a1a";
464			document.getElementById("vitrinenyeniler").style.background = "#4c464f";
465			document.getElementById("vitrincoksatanlar").style.background = "#4c464f";
466		}
467		
468		
469	});
470}
471
472function VitrinEnYeniler(lang){
473	
474	$('div#sortingloading').fadeIn(400);
475	
476	$.ajax({
477		
478		type:'GET',
479		url:'../../controller/ProductsController.php?action=vitrinenyeniler&lang='+lang,
480		success : function(rtrn){
481			
482			$('div#Vitrin').html(rtrn);
483			$('div#Vitrin').fadeIn(0);
484			$('div#sortingloading').hide(0);
485			document.getElementById("vitrinenyeniler").style.background = "#f27a1a";
486			document.getElementById("vitrinindirimdekiler").style.background = "#4c464f";
487			document.getElementById("vitrincoksatanlar").style.background = "#4c464f";
488		}
489		
490		
491	});
492}
493	
494function KategoriCokSatanlar(id , lang){
495	
496	$('div#sortingloading').fadeIn(400);
497	
498	$.ajax({
499		
500		type:'GET',
501		url:'../../controller/ProductsController.php?action=kategoricoksatanlar&id='+id+'&lang='+lang,
502		success : function(rtrn){
503			
504			$('div#Kategori'+id).html(rtrn);
505			$('div#Kategori'+id).fadeIn(0);
506			$('div#sortingloading').hide(0);
507			document.getElementById("kategoricoksatanlar"+id).style.background = "#f27a1a";
508			document.getElementById("kategoriindirimdekiler"+id).style.background = "#4c464f";
509			document.getElementById("kategorienyeniler"+id).style.background = "#4c464f";
510		}
511		
512		
513	});
514}
515
516function KategoriIndirimdekiler(id , lang){
517	
518	$('div#sortingloading').fadeIn(400);
519	
520	$.ajax({
521		
522		type:'GET',
523		url:'../../controller/ProductsController.php?action=kategoriindirimdekiler&id='+id+'&lang='+lang,
524		success : function(rtrn){
525			
526			$('div#Kategori'+id).html(rtrn);
527			$('div#Kategori'+id).fadeIn(0);
528			$('div#sortingloading').hide(0);
529			document.getElementById("kategoriindirimdekiler"+id).style.background = "#f27a1a";
530			document.getElementById("kategoricoksatanlar"+id).style.background = "#4c464f";
531			document.getElementById("kategorienyeniler"+id).style.background = "#4c464f";
532		}
533		
534		
535	});
536}
537
538function KategoriEnYeniler(id , lang){
539	
540	$('div#sortingloading').fadeIn(400);
541	
542	$.ajax({
543		
544		type:'GET',
545		url:'../../controller/ProductsController.php?action=kategorienyeniler&id='+id+'&lang='+lang,
546		success : function(rtrn){
547			
548			$('div#Kategori'+id).html(rtrn);
549			$('div#Kategori'+id).fadeIn(0);
550			$('div#sortingloading').hide(0);
551			document.getElementById("kategorienyeniler"+id).style.background = "#f27a1a";
552			document.getElementById("kategoricoksatanlar"+id).style.background = "#f27a1a";
553			document.getElementById("kategoriindirimdekiler"+id).style.background = "#f27a1a";
554		}
555		
556		
557	});
558}
559
560function ProductTabsDetail(PTAB , PTCB , PTTS){
561	
562	$('div#product-tabs-detail').show(0);
563	
564	if(PTAB==1){
565	$('div#product-tabs-attributes').hide(0);
566	document.getElementById("product-tabs-attributes-button").style.background = "#eeeff4";
567	}
568	
569	if(PTCB==1){
570	$('div#product-tabs-comments').hide(0);	
571	document.getElementById("product-tabs-comments-button").style.background = "#eeeff4";
572	}
573	
574	if(PTTS==1){
575	$('div#product-tabs-shipping').hide(0);
576	document.getElementById("product-tabs-shipping-button").style.background = "#eeeff4";
577	}
578	
579	$('div#product-tabs-installments').hide(0);
580	
581	
582	document.getElementById("product-tabs-detail-button").style.background = "#fff";
583	document.getElementById("product-tabs-installments-button").style.background = "#eeeff4";
584	
585	
586	
587	
588}
589
590function ProductTabsAttributes(PTAB , PTCB , PTTS){
591	
592	$('div#product-tabs-attributes').show(0);
593	$('div#product-tabs-detail').hide(0);
594	
595	if(PTCB==1){
596	$('div#product-tabs-comments').hide(0);	
597	document.getElementById("product-tabs-comments-button").style.background = "#eeeff4";
598	}
599	
600	if(PTTS==1){
601	$('div#product-tabs-shipping').hide(0);
602	document.getElementById("product-tabs-shipping-button").style.background = "#eeeff4";
603	}
604	
605	$('div#product-tabs-installments').hide(0);
606	document.getElementById("product-tabs-attributes-button").style.background = "#fff";
607	document.getElementById("product-tabs-detail-button").style.background = "#eeeff4";
608	document.getElementById("product-tabs-installments-button").style.background = "#eeeff4";
609	
610}
611
612function ProductTabsComments(PTAB , PTCB , PTTS){
613	
614	$('div#product-tabs-comments').show(0);
615	$('div#product-tabs-detail').hide(0);
616	
617	if(PTAB==1){
618	$('div#product-tabs-attributes').hide(0);
619	document.getElementById("product-tabs-attributes-button").style.background = "#eeeff4";
620	}
621	
622	if(PTTS==1){
623	$('div#product-tabs-shipping').hide(0);
624	document.getElementById("product-tabs-shipping-button").style.background = "#eeeff4";
625	}
626	
627	$('div#product-tabs-installments').hide(0);
628	document.getElementById("product-tabs-comments-button").style.background = "#fff";
629	document.getElementById("product-tabs-installments-button").style.background = "#eeeff4";
630	document.getElementById("product-tabs-detail-button").style.background = "#eeeff4";
631	
632}
633
634function ProductTabsInstallments(PTAB , PTCB , PTTS , id){
635	
636	$.ajax({
637		
638		type:'GET',
639		url:'../../controller/ProductsController.php?action=getproductinstallment&id='+id,
640		success : function(rtrn){
641			$('div#product-tabs-installments').html(rtrn);
642			$('div#product-tabs-installments').fadeIn(200);
643		}
644		
645	});
646	
647	
648	$('div#product-tabs-detail').hide(0);
649
650	if(PTAB==1){
651	$('div#product-tabs-attributes').hide(0);
652	document.getElementById("product-tabs-attributes-button").style.background = "#eeeff4";
653	}
654	
655	if(PTCB==1){
656	$('div#product-tabs-comments').hide(0);	
657	document.getElementById("product-tabs-comments-button").style.background = "#eeeff4";
658	}
659	
660	if(PTTS==1){
661	$('div#product-tabs-shipping').hide(0);
662	document.getElementById("product-tabs-shipping-button").style.background = "#eeeff4";
663	}
664	
665	document.getElementById("product-tabs-installments-button").style.background = "#fff";
666	document.getElementById("product-tabs-detail-button").style.background = "#eeeff4";
667
668}	
669
670function ProductTabsShippingInfo(PTAB , PTCB , PTTS){
671	
672	$('div#product-tabs-shipping').show(0);
673	$('div#product-tabs-detail').hide(0);
674
675	if(PTAB==1){
676	$('div#product-tabs-attributes').hide(0);
677	document.getElementById("product-tabs-attributes-button").style.background = "#eeeff4";
678	}
679	
680	if(PTCB==1){
681	$('div#product-tabs-comments').hide(0);	
682	document.getElementById("product-tabs-comments-button").style.background = "#eeeff4";
683	}
684	
685	$('div#product-tabs-installments').hide(0);
686	document.getElementById("product-tabs-shipping-button").style.background = "#fff";
687	document.getElementById("product-tabs-installments-button").style.background = "#eeeff4";
688	document.getElementById("product-tabs-detail-button").style.background = "#eeeff4";
689
690}
691
692/*
693$("#ddlEmployee").change(function () {
694	
695	 var cntrol = $(this);
696	 var valueId = cntrol.find(':selected').data('city');
697	
698     alert(valueId);
699});
700*/
701
702function asmGroup(val, lang , selectGroup , sendGroup , groupLine){
703	
704	$('div#sortingloading').fadeIn(400);
705	
706	var valueId = $(val).find(':selected').data('city');
707	
708	$.ajax({
709		type:'GET',
710		url:'../../controller/ProductsController.php?action=asmGroup&id='+valueId+'&lang='+lang+'&selectGroup='+selectGroup+'&sendGroup='+sendGroup+'&groupLine='+groupLine,
711		success : function(rtrn){
712			
713			//alert(rtrn);
714			
715			if(groupLine=='group1'){
716				groupLine='group2';
717			}else if(groupLine=='group2'){
718				groupLine='group3';
719			}else if(groupLine=='group3'){
720				groupLine='group4';
721			}
722			
723			
724			$('#'+groupLine).html(rtrn);
725			$('#'+groupLine).fadeIn(100);
726			$('div#sortingloading').fadeOut(0);
727		}
728	});
729	
730}
731
732function asmGroupUrunGrubuSecimi(val , ilkDeger){
733	
734	$('div#sortingloading').fadeIn(400);
735	
736	if(val!=''){
737		document.getElementById('asmGroupUrunGrubuSecimi').innerHTML = '';
738	}else{
739		document.getElementById('asmGroupUrunGrubuSecimi').innerHTML = '<input type="hidden" name="pagename" value="search" /><input type="hidden" name="q" value="'+ilkDeger+'" />';
740	}
741	
742	$('div#asmGroupUrunGrubuSecimi').fadeIn(100);
743	
744	$('div#sortingloading').fadeOut(0);
745}
746
747function asmFormAction(){
748	
749	$('div#sortingloading').fadeIn(400);
750	
751	$.ajax({
752		type:'POST',
753		url:'../../controller/ProductsController.php?action=asmAction',
754		data:$('#asmOtoFiltreForm').serialize(),
755		success : function(rtrn){
756			
757			rtrn = JSON.parse(rtrn);
758			
759			var finalUrl = '';
760			
761			$.each( rtrn.Url, function( key, value ) {
762			  finalUrl = finalUrl+key + "=" + value + '&';
763			});
764			
765			finalUrl = finalUrl.slice(0,-1);
766			finalUrl = finalUrl.replace('group1' , 'sortingattribute');
767			finalUrl = finalUrl.replace('group2' , 'sortingattribute');
768			finalUrl = finalUrl.replace('group3' , 'sortingattribute');
769			finalUrl = finalUrl.replace('group4' , 'sortingattribute');
770			
771			
772			window.top.location.href="/index.php?"+finalUrl;
773		}
774	});
775}
776
777function dynamicSearchDelay(callback, ms) {
778  var timer = 0;
779  return function() {
780    var context = this, args = arguments;
781    clearTimeout(timer);
782    timer = setTimeout(function () {
783      callback.apply(context, args);
784    }, ms || 0);
785  };
786}
787
788		
789		$('#header-search-input').keyup(dynamicSearchDelay(function (e) {
790			
791			val = this.value;
792			lang = this.lang;
793			
794			if(val.length>=3){
795
796				$('div#sortingloading').fadeIn(400);
797				$.ajax({
798
799				type:'GET',
800				url:'../../controller/ProductsController.php?action=dynamicSearch&q='+val+'&lang='+lang,
801				success : function(rtrn){
802				//alert(rtrn);
803				$('div.dynamicSearchResult').html(rtrn);
804				$('div.dynamicSearchResult').fadeIn(0);
805				$('div.dynamicSearchResultWindow').fadeIn(0);
806				$('div#sortingloading').fadeOut(0);
807
808				}
809
810				});
811			}else{
812				dynamicSearchClose();
813			}
814			
815		}, 1000));
816		
817	
818
819
820
821function dynamicSearchClose(){
822	$('div.dynamicSearchResult').fadeOut(0);
823	$('div.dynamicSearchResultWindow').fadeOut(0);
824}
825	
826function Mobile_ProductInfo_V4(Str){
827
828$('div#urun-bilgisi').hide();
829$('div#teslimat').hide();
830$('div#iade-degisim').hide();
831$('div#yorumlar').hide();
832
833$('div#'+Str).fadeIn(100);
834$("html, body").animate({ scrollTop: $('#mobile-to-bottom').offset().top }, 500);
835
836}
837
838
839

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.