Author: jleroux
Date: Thu Oct 15 10:20:22 2015
New Revision: 1708775
URL:
http://svn.apache.org/viewvc?rev=1708775&view=revLog:
Completes r1708768
Modified:
ofbiz/branches/release12.04/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java
Modified: ofbiz/branches/release12.04/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java?rev=1708775&r1=1708774&r2=1708775&view=diff==============================================================================
--- ofbiz/branches/release12.04/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java (original)
+++ ofbiz/branches/release12.04/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java Thu Oct 15 10:20:22 2015
@@ -592,7 +592,7 @@ public class ShoppingCartEvents {
request.setAttribute("itemId", itemId);
}
try {
- GenericValue product = EntityQuery.use(delegator).from("Product").where("productId", productId).queryOne();
+ GenericValue product = delegator.findOne("Product", UtilMisc.toMap("productId", productId), false);
//Reset shipment method information in cart only if shipping applies on product.
if (ProductWorker.shippingApplies(product)) {
for (int shipGroupIndex = 0; shipGroupIndex < cart.getShipGroupSize(); shipGroupIndex++) {
@@ -863,13 +863,13 @@ public class ShoppingCartEvents {
HttpSession session = request.getSession();
GenericValue userLogin = (GenericValue) session.getAttribute("userLogin");
if (userLogin != null && "anonymous".equals(userLogin.get("userLoginId"))) {
- Locale locale = UtilHttp.getLocale(session);
-
+ Locale locale = UtilHttp.getLocale(session);
+
// here we want to do a full logout, but not using the normal logout stuff because it saves things in the UserLogin record that we don't want changed for the anonymous user
session.invalidate();
session = request.getSession(true);
if (null != locale) {
- UtilHttp.setLocale(session, locale);
+ UtilHttp.setLocale(session, locale);
}
// to allow the display of the order confirmation page put the userLogin in the request, but leave it out of the session