Subversion Repositories SmartDukaan

Rev

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

Rev 18708 Rev 18710
Line 358... Line 358...
358
		if (typeof(Storage) !== "undefined") {
358
		if (typeof(Storage) !== "undefined") {
359
			localStorage.removeItem("productdetail");
359
			localStorage.removeItem("productdetail");
360
			localStorage.setItem("productdetail", $(this).closest(".card").html());
360
			localStorage.setItem("productdetail", $(this).closest(".card").html());
361
		}
361
		}
362
		$('#loadingModal').modal();
362
		$('#loadingModal').modal();
-
 
363
		var redirect_url = $(this).data('url');
363
		var call = apihost+"clicks/add/"+me+"/"+$(this).data('id')+'/'+$(this).data('source')+'/?url='+encodeURIComponent($(this).data('url'))+'&price='+$(this).data('price');
364
		var call = apihost+"clicks/add/"+me+"/"+$(this).data('id')+'/'+$(this).data('source')+'/?url='+encodeURIComponent($(this).data('url'))+'&price='+$(this).data('price');
364
		$.ajax({
365
		$.ajax({
365
			url: call,
366
			url: call,
366
			// The name of the callback parameter, as specified by the YQL service
367
			// The name of the callback parameter, as specified by the YQL service
367
			jsonp: "callback",
368
			jsonp: "callback",
Line 371... Line 372...
371
			data: {
372
			data: {
372
				format: "json"
373
				format: "json"
373
			},
374
			},
374
			// Work with the response
375
			// Work with the response
375
			success: function( response ) {
376
			success: function( response ) {
376
				console.log(response);
377
//				console.log(response);
-
 
378
				window.location = redirect_url;
377
			}
379
			},
-
 
380
			error: function() {
-
 
381
				window.location = redirect_url;
-
 
382
            }
378
			});
383
			});
379
		var url = $(this).data('url');
-
 
380
		
-
 
381
		window.location = url;
-
 
382
	});
384
	});
383
	
385
	
384
	$(document).on('click','.viewproduct',function(e){
386
	$(document).on('click','.viewproduct',function(e){
385
 
387
 
386
		var proid = $(this).data("proid");
388
		var proid = $(this).data("proid");