Subversion Repositories SmartDukaan

Rev

Rev 421 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 421 Rev 424
Line 55... Line 55...
55
	}
55
	}
56
	
56
	
57
	
57
	
58
	 // GET /entity
58
	 // GET /entity
59
    public HttpHeaders index() {
59
    public HttpHeaders index() {
60
    	
-
 
61
    	return new DefaultHttpHeaders("index").disableCaching();
60
    	return new DefaultHttpHeaders("index").disableCaching();
62
    }
61
    }
63
    
62
    
64
    // POST /entity
63
    // POST /entity
65
    public String create() {
64
    public String create() {
66
    	log.info("OrderController.create");
65
    	log.info("OrderController.create");
67
  
-
 
68
//    	log.info("item id is " + this.reqparams.get("item_id"));
66
    	if(!userinfo.isLoggedIn()){
69
//    	cartId = this.reqparams.get("item_id")[0];
67
    		//redirect to the login or signIn page and it should be redirected back once user is logged in 
70
    	
68
    	}else{
-
 
69
    		//Display the cart, amount, payment options and address along with pay button
71
    	
70
    		
72
		//long userId = Long.parseLong(this.session.getAttribute("userid").toString());
-
 
73
		long userId = this.userinfo.getUserId();
71
    		long userId = this.userinfo.getUserId();
74
		
-
 
75
		createOrderFromCart(userId);
72
    		createOrderFromCart(userId);
76
		
73
    	}
77
    	//createOrderFromCart(Long.parseLong(cartId));
-
 
78
    	
74
    	
79
		return "success";
75
		return "success";
80
    }
76
    }
81
    
77
    
82
  
78