svn commit: r451353 - /incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java

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

svn commit: r451353 - /incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java

sichen
Author: sichen
Date: Fri Sep 29 10:15:30 2006
New Revision: 451353

URL: http://svn.apache.org/viewvc?view=rev&rev=451353
Log:
Small improvement to the marketing packages code in checkout helper

Modified:
    incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java

Modified: incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java?view=diff&rev=451353&r1=451352&r2=451353
==============================================================================
--- incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java (original)
+++ incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java Fri Sep 29 10:15:30 2006
@@ -557,13 +557,13 @@
         Iterator orderItems = ((List)context.get("orderItems")).iterator();
         int counter = 0;
         while (orderItems.hasNext()) {
-            GenericValue orderItem = (GenericValue)orderItems.next();
+            GenericValue orderItem = (GenericValue) orderItems.next();
             String productId = orderItem.getString("productId");
             if (productId != null) {
                 try {
-                    // do something tricky here: run as a different user
+                    // do something tricky here: run as the "system" user
                     // that can actually create and run a production run
-                    GenericValue permUserLogin = delegator.findByPrimaryKey("UserLogin", UtilMisc.toMap("userLoginId", "system"));
+                    GenericValue permUserLogin = delegator.findByPrimaryKeyCache("UserLogin", UtilMisc.toMap("userLoginId", "system"));
                     GenericValue productStore = ProductStoreWorker.getProductStore(productStoreId, delegator);
                     GenericValue product = delegator.findByPrimaryKey("Product", UtilMisc.toMap("productId", productId));
                     if ("AGGREGATED".equals(product.getString("productTypeId"))) {