Subversion Repositories SmartDukaan

Rev

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

Rev 9684 Rev 9686
Line 71... Line 71...
71
    
71
    
72
    public String index()  {
72
    public String index()  {
73
        if(cartId != -1){
73
        if(cartId != -1){
74
            try {
74
            try {
75
                UserContextService.Client userClient = (new UserClient()).getClient();
75
                UserContextService.Client userClient = (new UserClient()).getClient();
76
                Cart cart = userClient.getCurrentCart(userinfo.getUserId());
-
 
77
                cartId = cart.getId();
-
 
78
                List<String> cartResponse  = userClient.validateCart(cartId, -1);
76
                List<String> cartResponse  = userClient.validateCart(cartId, -1);
79
                errorMsg = cartResponse.get(0);
77
                errorMsg = cartResponse.get(0);
80
                if(StringUtils.isNotEmpty(cartResponse.get(1))) {
78
                if(StringUtils.isNotEmpty(cartResponse.get(1))) {
81
                    addActionMessage(cartResponse.get(1));
79
                    addActionMessage(cartResponse.get(1));
82
                }
80
                }
83
                log.info("Cart Change/EMI Message rcvd from the service is:" + errorMsg);
81
                log.info("Cart Change/EMI Message rcvd from the service is:" + errorMsg);
84
                
82
                
-
 
83
                Cart cart = userClient.getCurrentCart(userinfo.getUserId());
85
                cartPojoJson = new Gson().toJson(PojoPopulator.getCartPojo(cart, errorMsg));
84
                cartPojoJson = new Gson().toJson(PojoPopulator.getCartPojo(cart, errorMsg));
86
                
85
                
87
            } catch (Exception e) {
86
            } catch (Exception e) {
88
                // This exception can be ignored for showing the cart. Not so
87
                // This exception can be ignored for showing the cart. Not so
89
                // innocent when this occurs at the time of checkout or when the
88
                // innocent when this occurs at the time of checkout or when the