svn commit: r1708774 - /ofbiz/branches/release13.07/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1708774 - /ofbiz/branches/release13.07/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java

jleroux@apache.org
Author: jleroux
Date: Thu Oct 15 10:19:59 2015
New Revision: 1708774

URL: http://svn.apache.org/viewvc?rev=1708774&view=rev
Log:
Completes r1708767

Modified:
    ofbiz/branches/release13.07/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java

Modified: ofbiz/branches/release13.07/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java?rev=1708774&r1=1708773&r2=1708774&view=diff
==============================================================================
--- ofbiz/branches/release13.07/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java (original)
+++ ofbiz/branches/release13.07/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java Thu Oct 15 10:19:59 2015
@@ -54,7 +54,6 @@ import org.ofbiz.entity.GenericValue;
 import org.ofbiz.entity.condition.EntityCondition;
 import org.ofbiz.entity.condition.EntityOperator;
 import org.ofbiz.entity.util.EntityUtil;
-import org.ofbiz.order.shoppingcart.ShoppingCart.ProductPromoUseInfo;
 import org.ofbiz.order.shoppingcart.product.ProductPromoWorker;
 import org.ofbiz.product.catalog.CatalogWorker;
 import org.ofbiz.product.config.ProductConfigWorker;
@@ -652,7 +651,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++) {
@@ -923,13 +922,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