Subversion Repositories SmartDukaan

Rev

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

Rev 15159 Rev 15188
Line 130... Line 130...
130
			error: function(request, status, err) {
130
			error: function(request, status, err) {
131
				//console.log(status+' '+err+' '+request);
131
				//console.log(status+' '+err+' '+request);
132
            	// if (status == "timeout") {
132
            	// if (status == "timeout") {
133
            		var btn = $("<a class='tryagainforliveprice btn btn-xs btn-warning' title='Try Again'>Try Again</a>");
133
            		var btn = $("<a class='tryagainforliveprice btn btn-xs btn-warning' title='Try Again'>Try Again</a>");
134
					$(that).html(btn);
134
					$(that).html(btn);
-
 
135
					try{
-
 
136
						if(response){
135
					ga('send', 'event', 'liveprice', 'error', response.products[0]._id);
137
							ga('send', 'event', 'liveprice', 'error', response.products[0]._id);
-
 
138
						}						
-
 
139
					} catch(e){}
136
				// } else {
140
				// } else {
137
					// $(that).parent().parent().remove();
141
					// $(that).parent().parent().remove();
138
				// }
142
				// }
139
			}
143
			}
140
		});
144
		});
Line 239... Line 243...
239
			// Work with the response
243
			// Work with the response
240
			success: function( response ) {
244
			success: function( response ) {
241
				if(response.success && response.type=='redirect'){
245
				if(response.success && response.type=='redirect'){
242
					if(store == 1) {
246
					if(store == 1) {
243
						document.location = 'http://mobilehotindia.com/r.html?'+Base64.encode(response.url);
247
						document.location = 'http://mobilehotindia.com/r.html?'+Base64.encode(response.url);
-
 
248
					}else if (store == 3) {
-
 
249
						if(response.showmessage == 1) {
-
 
250
							$('#loadingModal').modal('hide');
-
 
251
							$('#customMessage').html(response.message);
-
 
252
							$('#customMessageModal').modal('show');
-
 
253
							setTimeout(function(){ $('#customMessageModal').modal('hide'); document.location = response.url;}, 1000*3);			
-
 
254
						}
244
					}else{
255
					}else{
245
						document.location = response.url;
256
						document.location = response.url;
246
					}										
257
					}										
247
				}
258
				}
248
			}
259
			}