Subversion Repositories SmartDukaan

Rev

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

Rev 1446 Rev 1466
Line 70... Line 70...
70
			    defaultAddressId = userClient.getDefaultAddressId(userId);
70
			    defaultAddressId = userClient.getDefaultAddressId(userId);
71
			}
71
			}
72
			log.info("The default address id of this user is: " + defaultAddressId);
72
			log.info("The default address id of this user is: " + defaultAddressId);
73
			if(defaultAddressId > 0)
73
			if(defaultAddressId > 0)
74
				userClient.addAddressToCart(cartId, defaultAddressId);
74
				userClient.addAddressToCart(cartId, defaultAddressId);
75
			if(!userClient.validateCart(cartId))
75
			errorMsg = userClient.validateCart(cartId);
76
				errorMsg = "Your cart has been updated.";
-
 
77
			
76
			
78
		} catch (Exception e) {
77
		} catch (Exception e) {
79
			// This exception can be ignored for showing the cart. Not so
78
			// This exception can be ignored for showing the cart. Not so
80
			// innocent when this occurs at the time of checkout or when the
79
			// innocent when this occurs at the time of checkout or when the
81
			// user is proceeding to pay.
80
			// user is proceeding to pay.
Line 151... Line 150...
151
				
150
				
152
				if(action.equals("change"))	{
151
				if(action.equals("change"))	{
153
					addressId = Long.parseLong(this.request.getParameter("addressid"));
152
					addressId = Long.parseLong(this.request.getParameter("addressid"));
154
					userClient.addAddressToCart(userinfo.getCartId(), addressId);
153
					userClient.addAddressToCart(userinfo.getCartId(), addressId);
155
					
154
					
156
					if(!userClient.validateCart(userinfo.getCartId()))
155
					errorMsg = userClient.validateCart(userinfo.getCartId());
157
						errorMsg = "Your cart has been updated.";
-
 
158
					return "index";
156
					return "index";
159
				}
157
				}
160
			}
158
			}
161
		} catch (Exception e) {
159
		} catch (Exception e) {
162
			return "failure";
160
			return "failure";