Subversion Repositories SmartDukaan

Rev

Rev 16940 | Rev 17017 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 16940 Rev 17006
Line 38... Line 38...
38
		pma.send('apk','paytm','inactive',me,null);
38
		pma.send('apk','paytm','inactive',me,null);
39
		$('#loadingModal').modal('hide');
39
		$('#loadingModal').modal('hide');
40
		showPaytmPopup(url);
40
		showPaytmPopup(url);
41
	}
41
	}
42
}
42
}
-
 
43
 
-
 
44
function redirectTohomeShop18(url){
-
 
45
	url = 'http://mobilehotindia.com/r.html?'+Base64.encode(url);
-
 
46
	//check if paytm is active or not
-
 
47
	var paytmactive = getCookie('homeShop18',1);
-
 
48
	if(paytmactive && paytmactive == 'true'){		
-
 
49
		document.location = url;	
-
 
50
		pma.send('apk','homeShop18','active',me,null);
-
 
51
	}else{
-
 
52
		pma.send('apk','homeShop18','inactive',me,null);
-
 
53
		$('#loadingModal').modal('hide');
-
 
54
		showhomeShop18Popup(url);
-
 
55
	}
-
 
56
}
-
 
57
 
-
 
58
function showhomeShop18Popup(url){
-
 
59
	$('#homeShop18Url').prop('href',url);
-
 
60
	$('#homeShop18Modal').modal('show');
-
 
61
	return;
-
 
62
};
-
 
63
 
43
$(function(){	
64
$(function(){	
44
	if($('.scroll > .card').length>0) {
65
	if($('.scroll > .card').length>0) {
45
		setTimeout(function(){ document.location.reload(); }, 1000*15*60);
66
		setTimeout(function(){ document.location.reload(); }, 1000*15*60);
46
		if(typeof noscrolling == 'undefined') {
67
		if(typeof noscrolling == 'undefined') {
47
			$('.scroll').jscroll({
68
			$('.scroll').jscroll({
Line 98... Line 119...
98
			// timeout: 30000,
119
			// timeout: 30000,
99
			// Work with the response
120
			// Work with the response
100
			success: function( response ) {
121
			success: function( response ) {
101
				if(response.success){
122
				if(response.success){
102
					var i = 0;	
123
					var i = 0;	
103
					var minpriceindex = 0;									
124
					var minpriceindex = 0;		
104
					if(response.products[i].in_stock == 1) {
125
					if(response.products[i].in_stock == 1) {
105
						inStock = true;
126
						inStock = true;
106
						var minprice = 9999999;//Math.round(response.products[i]['available_price']);
127
						var minprice = 9999999;//Math.round(response.products[i]['available_price']);
107
						var minpriceurl = response.products[i]['marketPlaceUrl'];
128
						var minpriceurl = response.products[i]['marketPlaceUrl'];
108
					}
129
					}
Line 350... Line 371...
350
					  			redirectToPaytm(response.url);	
371
					  			redirectToPaytm(response.url);	
351
					  		});	
372
					  		});	
352
				  		}else{
373
				  		}else{
353
				  			redirectToPaytm(response.url);	
374
				  			redirectToPaytm(response.url);	
354
				  		}
375
				  		}
-
 
376
 
-
 
377
					} 
-
 
378
					  //for homeshop 18
-
 
379
				  	  else if(store == 7)
-
 
380
				  	  {
-
 
381
				  	  	
-
 
382
				  			redirectTohomeshop18(response.url);	
-
 
383
				  		
-
 
384
				  	  }
355
					} else if (store == 3 || store == 2) {
385
					  else if (store == 3 || store == 2) {
356
						if (store == 2){
386
						if (store == 2){
357
							response.url = 'http://mobilehotindia.com/r.html?'+Base64.encode(response.url);
387
							response.url = 'http://mobilehotindia.com/r.html?'+Base64.encode(response.url);
358
						}
388
						}
359
						if (store == 3){
389
						if (store == 3){
360
							response.url = '/r.html?'+Base64.encode(response.url);
390
							response.url = '/r.html?'+Base64.encode(response.url);