| Line 96... |
Line 96... |
| 96 |
defaultAddressId = userClient.getDefaultAddressId(userId);
|
96 |
defaultAddressId = userClient.getDefaultAddressId(userId);
|
| 97 |
}
|
97 |
}
|
| 98 |
log.info("The default address id of this user is: " + defaultAddressId);
|
98 |
log.info("The default address id of this user is: " + defaultAddressId);
|
| 99 |
if(defaultAddressId > 0)
|
99 |
if(defaultAddressId > 0)
|
| 100 |
userClient.addAddressToCart(cartId, defaultAddressId);
|
100 |
userClient.addAddressToCart(cartId, defaultAddressId);
|
| 101 |
errorMsg = userClient.validateCart(cartId, sourceId);
|
101 |
errorMsg = userClient.validateCart(cartId, sourceId).get(0);
|
| 102 |
|
102 |
|
| 103 |
} catch (Exception e) {
|
103 |
} catch (Exception e) {
|
| 104 |
// This exception can be ignored for showing the shipping page. Not so
|
104 |
// This exception can be ignored for showing the shipping page. Not so
|
| 105 |
// innocent when this occurs at the time of checkout or when the
|
105 |
// innocent when this occurs at the time of checkout or when the
|
| 106 |
// user is proceeding to pay.
|
106 |
// user is proceeding to pay.
|
| Line 188... |
Line 188... |
| 188 |
userClient.addStoreToCart(userinfo.getCartId(), addressId);
|
188 |
userClient.addStoreToCart(userinfo.getCartId(), addressId);
|
| 189 |
} else {
|
189 |
} else {
|
| 190 |
userClient.addAddressToCart(userinfo.getCartId(), addressId);
|
190 |
userClient.addAddressToCart(userinfo.getCartId(), addressId);
|
| 191 |
}
|
191 |
}
|
| 192 |
|
192 |
|
| 193 |
errorMsg = userClient.validateCart(userinfo.getCartId(), sourceId);
|
193 |
errorMsg = userClient.validateCart(userinfo.getCartId(), sourceId).get(0);
|
| 194 |
DataLogger.logData(EventType.SHIPPINIG_ADD_CHANGE, getSessionId(), userinfo.getUserId(), userinfo.getEmail(),
|
194 |
DataLogger.logData(EventType.SHIPPINIG_ADD_CHANGE, getSessionId(), userinfo.getUserId(), userinfo.getEmail(),
|
| 195 |
Long.toString(userinfo.getCartId()), Long.toString(addressId));
|
195 |
Long.toString(userinfo.getCartId()), Long.toString(addressId));
|
| 196 |
return "index";
|
196 |
return "index";
|
| 197 |
}
|
197 |
}
|
| 198 |
}
|
198 |
}
|