Subversion Repositories SmartDukaan

Rev

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

Rev 17782 Rev 17784
Line 59... Line 59...
59
    private boolean privateDealUser = false;
59
    private boolean privateDealUser = false;
60
    private boolean autoApplicationOff = true;
60
    private boolean autoApplicationOff = true;
61
    
61
    
62
    private long id =-1; //CartId
62
    private long id =-1; //CartId
63
    private String cartPojoJson;
63
    private String cartPojoJson;
-
 
64
    private String cartMap = null;
64
    private long quantity;
65
    private long quantity;
65
    private int insuranceType;
66
    private int insuranceType;
66
    UserContextService.Client userClient;
67
    UserContextService.Client userClient;
67
    
68
    
68
    public CartController() throws Exception{
69
    public CartController() throws Exception{
Line 417... Line 418...
417
 
418
 
418
    public String getCartPojoJson() {
419
    public String getCartPojoJson() {
419
        return cartPojoJson;
420
        return cartPojoJson;
420
    }
421
    }
421
    
422
    
-
 
423
    public void setCartMap(String cartMap) {
-
 
424
    	this.cartMap = cartMap;
-
 
425
    }
-
 
426
    
422
    
427
    
423
    public String validateCart() {
428
    public String validateCart() {
424
    	if(!userinfo.isPrivateDealUser()){
429
    	if(!userinfo.isPrivateDealUser()){
425
    		cartPojoJson = "{\"response\":\"error\", \"message\":\"Invalid request.\"}";
430
    		cartPojoJson = "{\"response\":\"error\", \"message\":\"Invalid request.\"}";
426
    	} else {
431
    	} else {
427
    		String cartMap = request.getParameter("cartMap");
-
 
428
    		if(StringUtils.isEmpty(cartMap))
432
    		if(StringUtils.isEmpty(cartMap))
429
    			cartPojoJson = "{\"response\":\"error\", \"message\":\"Empty Cart.\"}";
433
    			cartPojoJson = "{\"response\":\"error\", \"message\":\"Empty Cart.\"}";
430
    		else {
434
    		else {
431
    			try{
435
    			try{
432
    				List<ItemQuantity> itemQuantities = new ArrayList<ItemQuantity>();
436
    				List<ItemQuantity> itemQuantities = new ArrayList<ItemQuantity>();