Subversion Repositories SmartDukaan

Rev

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

Rev 14417 Rev 14430
Line 35... Line 35...
35
			url: '/store_products/getliveprice/'+$(that).data('bundle_id')+'/'+$(that).data('id'),
35
			url: '/store_products/getliveprice/'+$(that).data('bundle_id')+'/'+$(that).data('id'),
36
			// Tell jQuery we're expecting JSONP
36
			// Tell jQuery we're expecting JSONP
37
			dataType: "json",
37
			dataType: "json",
38
			// Tell YQL what we want and that we want JSON			
38
			// Tell YQL what we want and that we want JSON			
39
			method: 'get',
39
			method: 'get',
40
			timeout: 30000,
40
			// timeout: 30000,
41
			// Work with the response
41
			// Work with the response
42
			success: function( response ) {
42
			success: function( response ) {
43
				if(response.success){
43
				if(response.success){
44
					var i = 0;	
44
					var i = 0;	
45
					var minpriceindex = 0;				
45
					var minpriceindex = 0;				
Line 88... Line 88...
88
					$(that).parent().parent().remove();
88
					$(that).parent().parent().remove();
89
				}
89
				}
90
			},
90
			},
91
			error: function(request, status, err) {
91
			error: function(request, status, err) {
92
				//console.log(status+' '+err+' '+request);
92
				//console.log(status+' '+err+' '+request);
93
            	if (status == "timeout") {
93
            	// if (status == "timeout") {
94
            		var btn = $("<a class='tryagainforliveprice' title='Try Again'>Try Again</a>");
94
            		var btn = $("<a class='tryagainforliveprice btn btn-xs btn-warning' title='Try Again'>Try Again</a>");
95
					$(that).html(btn)
95
					$(that).html(btn)
96
				} else {
96
				// } else {
97
					$(that).parent().parent().remove();
97
					// $(that).parent().parent().remove();
98
				}
98
				// }
99
			}
99
			}
100
		});
100
		});
101
		livePriceCalls.push(req);
101
		livePriceCalls.push(req);
102
	};
102
	};
103
	$(document).on('click','.variants',function(){
103
	$(document).on('click','.variants',function(){