PageSourceSearch

https://www.ikmultimedia.com/lib/IKPrice/IKPrice.js?UPD=20200101

js ikmultimedia.com collected 2026-10-02 02:19:44 UTC 6,785 bytes, 204 lines download raw bytes

1(function( $ ){
2 $.fn.IKPrice = function(sku,country,show_vat,alias,usage) {
3 var t = $(this);
4
5 if (!country){
6 country = 'US';
7 }
8
9 $.getJSON('/lib/IKPrice/IKPriceFeeder.php?P='+sku,	//+'&ORG='+country, 
10	 function(data) {
11
12
13	 if(usage=="prodpage") { // utilizzo nel menu della pagina di prodotto
14
15	 console.log("IKPrice - utilizzo nel menu della pagina di prodotto");
16
17
18
19	 if (data){
20
21	 var price = data.ValutaINT;
22	 //CN PRICE
23	 var cn_price=data.ValutaCN;
24	 var is_tmall=false;
25	 if(data.isTmallProduct=="Y") is_tmall=true; 
26	 var cn_currency="Â¥";
27	 //BR PRICE
28	 var br_price=data.ValutaBR;
29	 var is_novatrade=false;
30	 if(data.isNovatradeProduct=="Y") is_novatrade=true;
31	 var br_currency="R$";
32
33	 var vat_price_html="";
34	 var currency = '€';
35	 if(country=='cn' || country=='us' || country=='br'){
36		 var price = data.ValutaUS;
37		 currency = '$';
38	 }
39	 if(country=='br'){
40		var price = data.ValutaBR;
41		currency = 'R$';
42	 }
43	 var special_price="";
44	 var previousHTML = t.html();
45	 var txi = document.getElementsByClassName("extra-info")[0];
46	 var tpv = document.getElementsByClassName("price-value")[0]; 
47	 var mob_price_opt = document.getElementById("mobile-price-options");
48	 if (price>0){
49		 if(data.SpecialPromoPrice){
50			 var sp1=data.RegularPriceINT.toString().split('.')[0];
51			 var sp2=data.RegularPriceINT.toString().split('.')[1];
52			 console.log("data.RegularPriceINT = "+data.RegularPriceINT);
53			 if (data.RegularPriceINT!="") {
54				 special_price='&euro;<span>'+data.RegularPriceINT+"</span><br>"; 
55			 }
56			 if(country=='cn' || country=='us' || country=='br'){
57				sp1=data.RegularPriceUS.toString().split('.')[0];
58				sp2=data.RegularPriceUS.toString().split('.')[1];
59				console.log("data.RegularPriceUS = "+data.RegularPriceUS);
60				if (data.RegularPriceUS!="") {
61					 special_price='$<span >'+data.RegularPriceUS+"</span><br>";
62				}
63				if(country=='cn'){
64					if(is_tmall){
65						vat_price_html=cn_currency+cn_price;				
66					}else{
67						vat_price_html="(Approx. "+cn_currency+cn_price+")";
68					}
69				}
70				if(country=='br'){
71					if(is_novatrade){
72						vat_price_html=br_currency+br_price;
73					}else{
74						vat_price_html="(Approx. "+br_currency+br_price+")";
75					}
76				}
77			 }
78		 }
79		 if(show_vat=='Y' && (data.PriceINTInclVAT>price)){
80			 price+="<span class='in-ex-vat'> excl. VAT</span>";
81			 //vat_price_html="("+currency+data.PriceINTInclVAT+"<span style='font-size: 50%;'> incl. VAT</span>)";
82			 vat_price_html="("+currency+data.PriceINTInclVAT+"<span class='in-ex-vat'> incl. VAT</span>)";
83			 tpv.insertAdjacentHTML('beforeend', "<div><div class='main_price_ik'>"+currency + price+"</div>" + "<div class='vat_price_ik'>"+vat_price_html+"</div></div>"); 
84			 mob_price_opt.insertAdjacentHTML('beforeend', "<div><div class='main_price_ik'>"+currency + price+"</div>" + "<div class='vat_price_ik'>"+vat_price_html+"</div></div>");
85		 } else {
86			 tpv.insertAdjacentHTML('beforeend', "<div><div class='main_price_ik'>"+currency + price+"</div></div>"); 
87			 mob_price_opt.insertAdjacentHTML('beforeend', "<div><div class='main_price_ik'>"+currency + price+"</div></div>");
88		 }
89		 // special_price = "DEBUG";
90		 if (special_price!="") {
91			 txi.insertAdjacentHTML('beforeend', "<div class='original_price_ik'>"+special_price+"</div>"); 
92			 mob_price_opt.insertAdjacentHTML('beforeend', "<div class='original_price_ik'>"+special_price+"</div>");
93		 }
94	 } else {
95		 t.html('<span class="price-free">FREE</span>');//t.append('FREE'); 
96		 mob_price_opt.html('<span class="price-free">FREE</span>');
97	 }
98
99	 } // END if (data)
100
101
102	 } else { // CARD e altri usi 
103
104		 //console.log("IKPrice - CARD e altri usi");
105
106
107		 if (data){
108			 var price = data.ValutaINT;
109			 var vat_price_html="";
110			 var currency = '&euro;';
111			 var absolute_price=price;
112			// CN PRICE
113			 var cn_price=data.ValutaCN;
114			 var cn_currency="Â¥";
115			 var is_tmall=false;
116			 if(data.isTmallProduct=="Y") is_tmall=true;
117			 //BR PRICE
118			 var br_price=data.ValutaBR;
119			 var is_novatrade=false;
120			 if(data.isNovatradeProduct=="Y") is_novatrade=true;
121			 var br_currency="R$";
122
123			 if(country=='cn' || country=='us' || country=='br'){
124				 var price = data.ValutaUS;
125				 absolute_price=price;
126				 currency = '$';
127			 }
128			 var special_price="";
129			 t.html('');
130			 if (price>0){
131				 if(data.SpecialPromoPrice){
132					 var sp1=data.RegularPriceINT.toString().split('.')[0];
133					 var sp2=data.RegularPriceINT.toString().split('.')[1];
134					 
135					if (data.ValutaINT.toString() != data.RegularPriceINT.toString()){
136						special_price='&euro;<span style="text-decoration: line-through;">'+data.RegularPriceINT+"</span><br>"; 
137					}
138					else{
139						special_price="";
140					}
141
142					 if(country=='cn' || country=='us' || country=='br'){
143						sp1=data.RegularPriceUS.toString().split('.')[0];
144						sp2=data.RegularPriceUS.toString().split('.')[1];
145
146						if (data.ValutaUS.toString() != data.RegularPriceUS.toString()){
147							special_price='$<span style="text-decoration: line-through;">'+data.RegularPriceUS+"</span><br>";
148						}
149						else{
150							special_price="";
151						}
152
153						if(country=='cn'){
154							if(is_tmall){
155								vat_price_html=cn_currency+cn_price;
156							}else{
157								vat_price_html="(Approx. "+cn_currency+cn_price+")";
158							}
159						}
160						if(country=='br'){
161							if(is_novatrade){
162								vat_price_html=br_currency+br_price;
163							}else{
164								vat_price_html="(Approx. "+br_currency+br_price+")";
165							}
166						}
167					 }
168				 }
169				 if(country=='cn'){
170					if(is_tmall){
171						//vat_price_html=cn_currency+cn_price;
172						vat_price_html="";
173						currency=cn_currency;
174						price=cn_price;
175					}else{
176						vat_price_html="(Approx. "+cn_currency+cn_price+")";
177					}
178				 }else if(country=='br'){
179					if(is_novatrade){
180						vat_price_html="";
181						currency=br_currency;
182						price=br_price;
183					}else{
184						vat_price_html="(Approx. "+br_currency+br_price+")";
185					}
186				 }else if(show_vat=='Y' && (data.PriceINTInclVAT>price)){
187					price+="<span style='font-size: 50%;'> excl. VAT</span>";
188					vat_price_html="("+currency+data.PriceINTInclVAT+" incl. VAT)";
189				 }
190				var stylered="";
191				if (special_price!=="" && alias!="product_page"){//only red promo price on cards
192					stylered="style='color:#CC0000;'";
193				}
194				t.append("<div class='special_price_ik'>"+special_price+"</div>" + "<div class='main_price_ik' "+stylered+" >"+currency + price+"</div>" + "<div class='vat_price_ik'>"+vat_price_html+"</div><div id='"+alias+"-hidden-price-value' class='hidden-price-value'>"+absolute_price+"</div>");
195			 } else {
196				 t.append('<div class="main_price_ik">FREE</div>'+"<div id='"+alias+"-hidden-price-value' class='hidden-price-value'>0</div>");
197			 }
198		 }
199	 }	// END if(usage=="prodpage") - else			
200	 }
201);
202
203 };
204})( jQuery );

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.