PageSourceSearch

https://www.takva.com.tr/js/products.js?v=5.03.01.53&tv=

js takva.com.tr collected 2026-09-27 05:09:08 UTC 19,947 bytes, 833 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 Yorumlar(){
385		$('div#yorumlar').fadeIn(0);
386		$('html, body').animate({
387        scrollTop: $("#yorumlar").offset().top
388    }, 700);
389		ProductTabsComments();
390	}
391	
392function Yorumlar_bs(){
393
394		$( "#comments-tab" ).trigger( "click" );
395		$('html, body').animate({
396			scrollTop: $("#comments-tab").offset().top
397		}, 700);
398			
399	}
400	
401function Yorumlar_bs_new(){
402	$('html, body').animate({
403			scrollTop: $("#urun-detay-soru-baslik").offset().top
404		}, 700);
405}
406	
407function yorumYapNew(){
408	$('div#urun-detay-yorum-form-new').slideToggle();
409}
410
411function soruSorNew(){
412	$('div#urun-detay-soru-form-new').slideToggle();
413}
414
415function tumOzelliklerAcikFormat(){
416		$('html, body').animate({
417        scrollTop: $("#tumOzelliklerAcikFormat").offset().top
418    }, 700);
419}
420	
421	
422function VitrinCokSatanlar(lang){
423	
424	$('div#sortingloading').fadeIn(400);
425	
426	$.ajax({
427		
428		type:'GET',
429		url:'../../controller/ProductsController.php?action=vitrincoksatanlar&lang='+lang,
430		success : function(rtrn){
431			
432			$('div#Vitrin').html(rtrn);
433			$('div#Vitrin').fadeIn(0);
434			$('div#sortingloading').hide(0);
435			document.getElementById("vitrincoksatanlar").style.background = "#f27a1a";
436			document.getElementById("vitrinenyeniler").style.background = "#4c464f";
437			document.getElementById("vitrinindirimdekiler").style.background = "#4c464f";
438		}
439		
440		
441	});
442}
443
444function VitrinIndirimdekiler(lang){
445	
446	$('div#sortingloading').fadeIn(400);
447	
448	$.ajax({
449		
450		type:'GET',
451		url:'../../controller/ProductsController.php?action=vitrinindirimdekiler&lang='+lang,
452		success : function(rtrn){
453			
454			$('div#Vitrin').html(rtrn);
455			$('div#Vitrin').fadeIn(0);
456			$('div#sortingloading').hide(0);
457			document.getElementById("vitrinindirimdekiler").style.background = "#f27a1a";
458			document.getElementById("vitrinenyeniler").style.background = "#4c464f";
459			document.getElementById("vitrincoksatanlar").style.background = "#4c464f";
460		}
461		
462		
463	});
464}
465
466function VitrinEnYeniler(lang){
467	
468	$('div#sortingloading').fadeIn(400);
469	
470	$.ajax({
471		
472		type:'GET',
473		url:'../../controller/ProductsController.php?action=vitrinenyeniler&lang='+lang,
474		success : function(rtrn){
475			
476			$('div#Vitrin').html(rtrn);
477			$('div#Vitrin').fadeIn(0);
478			$('div#sortingloading').hide(0);
479			document.getElementById("vitrinenyeniler").style.background = "#f27a1a";
480			document.getElementById("vitrinindirimdekiler").style.background = "#4c464f";
481			document.getElementById("vitrincoksatanlar").style.background = "#4c464f";
482		}
483		
484		
485	});
486}
487	
488function KategoriCokSatanlar(id , lang){
489	
490	$('div#sortingloading').fadeIn(400);
491	
492	$.ajax({
493		
494		type:'GET',
495		url:'../../controller/ProductsController.php?action=kategoricoksatanlar&id='+id+'&lang='+lang,
496		success : function(rtrn){
497			
498			$('div#Kategori'+id).html(rtrn);
499			$('div#Kategori'+id).fadeIn(0);
500			$('div#sortingloading').hide(0);
501			document.getElementById("kategoricoksatanlar"+id).style.background = "#f27a1a";
502			document.getElementById("kategoriindirimdekiler"+id).style.background = "#4c464f";
503			document.getElementById("kategorienyeniler"+id).style.background = "#4c464f";
504		}
505		
506		
507	});
508}
509
510function KategoriIndirimdekiler(id , lang){
511	
512	$('div#sortingloading').fadeIn(400);
513	
514	$.ajax({
515		
516		type:'GET',
517		url:'../../controller/ProductsController.php?action=kategoriindirimdekiler&id='+id+'&lang='+lang,
518		success : function(rtrn){
519			
520			$('div#Kategori'+id).html(rtrn);
521			$('div#Kategori'+id).fadeIn(0);
522			$('div#sortingloading').hide(0);
523			document.getElementById("kategoriindirimdekiler"+id).style.background = "#f27a1a";
524			document.getElementById("kategoricoksatanlar"+id).style.background = "#4c464f";
525			document.getElementById("kategorienyeniler"+id).style.background = "#4c464f";
526		}
527		
528		
529	});
530}
531
532function KategoriEnYeniler(id , lang){
533	
534	$('div#sortingloading').fadeIn(400);
535	
536	$.ajax({
537		
538		type:'GET',
539		url:'../../controller/ProductsController.php?action=kategorienyeniler&id='+id+'&lang='+lang,
540		success : function(rtrn){
541			
542			$('div#Kategori'+id).html(rtrn);
543			$('div#Kategori'+id).fadeIn(0);
544			$('div#sortingloading').hide(0);
545			document.getElementById("kategorienyeniler"+id).style.background = "#f27a1a";
546			document.getElementById("kategoricoksatanlar"+id).style.background = "#f27a1a";
547			document.getElementById("kategoriindirimdekiler"+id).style.background = "#f27a1a";
548		}
549		
550		
551	});
552}
553
554function ProductTabsDetail(PTAB , PTCB , PTTS){
555	
556	$('div#product-tabs-detail').show(0);
557	
558	if(PTAB==1){
559	$('div#product-tabs-attributes').hide(0);
560	document.getElementById("product-tabs-attributes-button").style.background = "#eeeff4";
561	}
562	
563	if(PTCB==1){
564	$('div#product-tabs-comments').hide(0);	
565	document.getElementById("product-tabs-comments-button").style.background = "#eeeff4";
566	}
567	
568	if(PTTS==1){
569	$('div#product-tabs-shipping').hide(0);
570	document.getElementById("product-tabs-shipping-button").style.background = "#eeeff4";
571	}
572	
573	$('div#product-tabs-installments').hide(0);
574	
575	
576	document.getElementById("product-tabs-detail-button").style.background = "#fff";
577	document.getElementById("product-tabs-installments-button").style.background = "#eeeff4";
578	
579	
580	
581	
582}
583
584function ProductTabsAttributes(PTAB , PTCB , PTTS){
585	
586	$('div#product-tabs-attributes').show(0);
587	$('div#product-tabs-detail').hide(0);
588	
589	if(PTCB==1){
590	$('div#product-tabs-comments').hide(0);	
591	document.getElementById("product-tabs-comments-button").style.background = "#eeeff4";
592	}
593	
594	if(PTTS==1){
595	$('div#product-tabs-shipping').hide(0);
596	document.getElementById("product-tabs-shipping-button").style.background = "#eeeff4";
597	}
598	
599	$('div#product-tabs-installments').hide(0);
600	document.getElementById("product-tabs-attributes-button").style.background = "#fff";
601	document.getElementById("product-tabs-detail-button").style.background = "#eeeff4";
602	document.getElementById("product-tabs-installments-button").style.background = "#eeeff4";
603	
604}
605
606function ProductTabsComments(PTAB , PTCB , PTTS){
607	
608	$('div#product-tabs-comments').show(0);
609	$('div#product-tabs-detail').hide(0);
610	
611	if(PTAB==1){
612	$('div#product-tabs-attributes').hide(0);
613	document.getElementById("product-tabs-attributes-button").style.background = "#eeeff4";
614	}
615	
616	if(PTTS==1){
617	$('div#product-tabs-shipping').hide(0);
618	document.getElementById("product-tabs-shipping-button").style.background = "#eeeff4";
619	}
620	
621	$('div#product-tabs-installments').hide(0);
622	document.getElementById("product-tabs-comments-button").style.background = "#fff";
623	document.getElementById("product-tabs-installments-button").style.background = "#eeeff4";
624	document.getElementById("product-tabs-detail-button").style.background = "#eeeff4";
625	
626}
627
628function ProductTabsInstallments(PTAB , PTCB , PTTS , id){
629	
630	$.ajax({
631		
632		type:'GET',
633		url:'../../controller/ProductsController.php?action=getproductinstallment&id='+id,
634		success : function(rtrn){
635			$('div#product-tabs-installments').html(rtrn);
636			$('div#product-tabs-installments').fadeIn(200);
637		}
638		
639	});
640	
641	
642	$('div#product-tabs-detail').hide(0);
643
644	if(PTAB==1){
645	$('div#product-tabs-attributes').hide(0);
646	document.getElementById("product-tabs-attributes-button").style.background = "#eeeff4";
647	}
648	
649	if(PTCB==1){
650	$('div#product-tabs-comments').hide(0);	
651	document.getElementById("product-tabs-comments-button").style.background = "#eeeff4";
652	}
653	
654	if(PTTS==1){
655	$('div#product-tabs-shipping').hide(0);
656	document.getElementById("product-tabs-shipping-button").style.background = "#eeeff4";
657	}
658	
659	document.getElementById("product-tabs-installments-button").style.background = "#fff";
660	document.getElementById("product-tabs-detail-button").style.background = "#eeeff4";
661
662}	
663
664function ProductTabsShippingInfo(PTAB , PTCB , PTTS){
665	
666	$('div#product-tabs-shipping').show(0);
667	$('div#product-tabs-detail').hide(0);
668
669	if(PTAB==1){
670	$('div#product-tabs-attributes').hide(0);
671	document.getElementById("product-tabs-attributes-button").style.background = "#eeeff4";
672	}
673	
674	if(PTCB==1){
675	$('div#product-tabs-comments').hide(0);	
676	document.getElementById("product-tabs-comments-button").style.background = "#eeeff4";
677	}
678	
679	$('div#product-tabs-installments').hide(0);
680	document.getElementById("product-tabs-shipping-button").style.background = "#fff";
681	document.getElementById("product-tabs-installments-button").style.background = "#eeeff4";
682	document.getElementById("product-tabs-detail-button").style.background = "#eeeff4";
683
684}
685
686/*
687$("#ddlEmployee").change(function () {
688	
689	 var cntrol = $(this);
690	 var valueId = cntrol.find(':selected').data('city');
691	
692     alert(valueId);
693});
694*/
695
696function asmGroup(val, lang , selectGroup , sendGroup , groupLine){
697	
698	$('div#sortingloading').fadeIn(400);
699	
700	var valueId = $(val).find(':selected').data('city');
701	
702	$.ajax({
703		type:'GET',
704		url:'../../controller/ProductsController.php?action=asmGroup&id='+valueId+'&lang='+lang+'&selectGroup='+selectGroup+'&sendGroup='+sendGroup+'&groupLine='+groupLine,
705		success : function(rtrn){
706			
707			//alert(rtrn);
708			
709			if(groupLine=='group1'){
710				groupLine='group2';
711			}else if(groupLine=='group2'){
712				groupLine='group3';
713			}else if(groupLine=='group3'){
714				groupLine='group4';
715			}
716			
717			
718			$('#'+groupLine).html(rtrn);
719			$('#'+groupLine).fadeIn(100);
720			$('div#sortingloading').fadeOut(0);
721		}
722	});
723	
724}
725
726function asmGroupUrunGrubuSecimi(val , ilkDeger){
727	
728	$('div#sortingloading').fadeIn(400);
729	
730	if(val!=''){
731		document.getElementById('asmGroupUrunGrubuSecimi').innerHTML = '';
732	}else{
733		document.getElementById('asmGroupUrunGrubuSecimi').innerHTML = '<input type="hidden" name="pagename" value="search" /><input type="hidden" name="q" value="'+ilkDeger+'" />';
734	}
735	
736	$('div#asmGroupUrunGrubuSecimi').fadeIn(100);
737	
738	$('div#sortingloading').fadeOut(0);
739}
740
741function asmFormAction(){
742	
743	$('div#sortingloading').fadeIn(400);
744	
745	$.ajax({
746		type:'POST',
747		url:'../../controller/ProductsController.php?action=asmAction',
748		data:$('#asmOtoFiltreForm').serialize(),
749		success : function(rtrn){
750			
751			rtrn = JSON.parse(rtrn);
752			
753			var finalUrl = '';
754			
755			$.each( rtrn.Url, function( key, value ) {
756			  finalUrl = finalUrl+key + "=" + value + '&';
757			});
758			
759			finalUrl = finalUrl.slice(0,-1);
760			finalUrl = finalUrl.replace('group1' , 'sortingattribute');
761			finalUrl = finalUrl.replace('group2' , 'sortingattribute');
762			finalUrl = finalUrl.replace('group3' , 'sortingattribute');
763			finalUrl = finalUrl.replace('group4' , 'sortingattribute');
764			
765			
766			window.top.location.href="/index.php?"+finalUrl;
767		}
768	});
769}
770
771function dynamicSearchDelay(callback, ms) {
772  var timer = 0;
773  return function() {
774    var context = this, args = arguments;
775    clearTimeout(timer);
776    timer = setTimeout(function () {
777      callback.apply(context, args);
778    }, ms || 0);
779  };
780}
781
782		
783		$('#header-search-input').keyup(dynamicSearchDelay(function (e) {
784			
785			val = this.value;
786			lang = this.lang;
787			
788			if(val.length>=3){
789
790				$('div#sortingloading').fadeIn(400);
791				$.ajax({
792
793				type:'GET',
794				url:'../../controller/ProductsController.php?action=dynamicSearch&q='+val+'&lang='+lang,
795				success : function(rtrn){
796				//alert(rtrn);
797				$('div.dynamicSearchResult').html(rtrn);
798				$('div.dynamicSearchResult').fadeIn(0);
799				$('div.dynamicSearchResultWindow').fadeIn(0);
800				$('div#sortingloading').fadeOut(0);
801
802				}
803
804				});
805			}else{
806				dynamicSearchClose();
807			}
808			
809		}, 1000));
810		
811	
812
813
814
815function dynamicSearchClose(){
816	$('div.dynamicSearchResult').fadeOut(0);
817	$('div.dynamicSearchResultWindow').fadeOut(0);
818}
819	
820function Mobile_ProductInfo_V4(Str){
821
822$('div#urun-bilgisi').hide();
823$('div#teslimat').hide();
824$('div#iade-degisim').hide();
825$('div#yorumlar').hide();
826
827$('div#'+Str).fadeIn(100);
828$("html, body").animate({ scrollTop: $('#mobile-to-bottom').offset().top }, 500);
829
830}
831
832
833

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.