Subversion Repositories SmartDukaan

Rev

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

Rev 1614 Rev 1623
Line 9... Line 9...
9
 
9
 
10
	$("#zipcode").val($("#defaultpincode").val());
10
	$("#zipcode").val($("#defaultpincode").val());
11
 
11
 
12
    updateEstimate();
12
    updateEstimate();
13
    
13
    
14
    if($.cookie("uid")){
14
    if(!($.cookie("uid"))){
15
    	load_history_widget(true);
-
 
16
    }else{
-
 
17
    	if($.Storage.get("historyitems")){
15
    	if($.Storage.get("historyitems")){
18
    		var prodid = $("#product_id").val();
16
    		var prodid = $("#product_id").val();
19
    		var hisitems = $.Storage.get("historyitems");
17
    		var hisitems = $.Storage.get("historyitems");
20
    		if (hisitems.indexOf(prodid) < 0){
18
    		if (hisitems.indexOf(prodid) < 0){
21
    			//alert("prodid is" + prodid);
19
    			//alert("prodid is" + prodid);
Line 23... Line 21...
23
    		}
21
    		}
24
    		
22
    		
25
    	}else{
23
    	}else{
26
    		$.Storage.set("historyitems",  $("#product_id").val());
24
    		$.Storage.set("historyitems",  $("#product_id").val());
27
    	}
25
    	}
28
    	load_history_widget(false);
-
 
29
    }
26
    }
30
	
27
	
-
 
28
    load_history_widget();
-
 
29
    
31
	$("#addcart").click(function(){
30
	$("#addcart").click(function(){
32
		jQuery.ajax({
31
		jQuery.ajax({
33
			type: "POST",
32
			type: "POST",
34
			url: "/addtocart",
33
			url: "/addtocart",
35
			data: "productid=" + $("#item_id").val(),
34
			data: "productid=" + $("#item_id").val(),