Subversion Repositories SmartDukaan

Rev

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

Rev 3185 Rev 3209
Line 59... Line 59...
59
	
59
	
60
	 // GET /shipping
60
	 // GET /shipping
61
	 public String index() {
61
	 public String index() {
62
    	long userId = userinfo.getUserId();
62
    	long userId = userinfo.getUserId();
63
    	long cartId = userinfo.getCartId();
63
    	long cartId = userinfo.getCartId();
-
 
64
    	String itemIdString = "";
64
    	try {
65
    	try {
65
			UserContextService.Client userClient = (new UserClient()).getClient();
66
			UserContextService.Client userClient = (new UserClient()).getClient();
66
			userClient.checkOut(cartId);
67
			userClient.checkOut(cartId);
67
			Cart cart = userClient.getCart(cartId);
68
			Cart cart = userClient.getCart(cartId);
-
 
69
			itemIdString = Utils.getItemIdStringInCart(cart);
68
			long defaultAddressId = cart.getAddressId();
70
			long defaultAddressId = cart.getAddressId();
69
			if (defaultAddressId == 0) {
71
			if (defaultAddressId == 0) {
70
			    defaultAddressId = userClient.getDefaultAddressId(userId);
72
			    defaultAddressId = userClient.getDefaultAddressId(userId);
71
			}
73
			}
72
			log.info("The default address id of this user is: " + defaultAddressId);
74
			log.info("The default address id of this user is: " + defaultAddressId);
Line 87... Line 89...
87
			for (String str : actionErrors) {
89
			for (String str : actionErrors) {
88
			    errorMsg += "<BR/>" + str;
90
			    errorMsg += "<BR/>" + str;
89
			}
91
			}
90
		}
92
		}
91
        DataLogger.logData(EventType.SHIPPINIG_ACCESS, getSessionId(), userinfo.getUserId(), userinfo.getEmail(),
93
        DataLogger.logData(EventType.SHIPPINIG_ACCESS, getSessionId(), userinfo.getUserId(), userinfo.getEmail(),
92
                Long.toString(cartId));
94
                Long.toString(cartId), itemIdString);
93
		
95
		
94
    	return "index";
96
    	return "index";
95
	 }
97
	 }
96
 
98
 
97
	// POST /entity
99
	// POST /entity