Subversion Repositories SmartDukaan

Rev

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

Rev 2944 Rev 2974
Line 64... Line 64...
64
	
64
	
65
	 // GET /cart
65
	 // GET /cart
66
 
66
 
67
	@Action(value="cart",interceptorRefs={@InterceptorRef("myDefault")})
67
	@Action(value="cart",interceptorRefs={@InterceptorRef("myDefault")})
68
	 public String index() {
68
	 public String index() {
-
 
69
	    long cartId = userinfo.getCartId();
-
 
70
	    if(cartId != -1){
69
    	try {
71
        	try {
70
			UserContextService.Client userClient = (new UserContextServiceClient()).getClient();
72
    			UserContextService.Client userClient = (new UserContextServiceClient()).getClient();
71
			errorMsg = userClient.validateCart(userinfo.getCartId());
73
    			errorMsg = userClient.validateCart(cartId);
72
		} catch (Exception e) {
74
    		} catch (Exception e) {
73
			// This exception can be ignored for showing the cart. Not so
75
    			// This exception can be ignored for showing the cart. Not so
74
			// innocent when this occurs at the time of checkout or when the
76
    			// innocent when this occurs at the time of checkout or when the
75
			// user is proceeding to pay.
77
    			// user is proceeding to pay.
76
		    log.warn("Unable to validate the cart: ", e);
78
    		    log.warn("Unable to validate the cart: ", e);
77
		}
79
    		}
-
 
80
	    }
78
    	return "index";
81
    	return "index";
79
	 }
82
	 }
80
	// POST /entity
83
	// POST /entity
81
 
84
 
82
	@Action(value="addtocart",interceptorRefs={@InterceptorRef("createuser"),@InterceptorRef("myDefault")})
85
	@Action(value="addtocart",interceptorRefs={@InterceptorRef("createuser"),@InterceptorRef("myDefault")})