svn commit: r1305581 [13/36] - in /ofbiz/branches/20111205EmailHandling: ./ applications/accounting/config/ applications/accounting/data/ applications/accounting/entitydef/ applications/accounting/script/org/ofbiz/accounting/finaccount/ applications/ac...

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

svn commit: r1305581 [13/36] - in /ofbiz/branches/20111205EmailHandling: ./ applications/accounting/config/ applications/accounting/data/ applications/accounting/entitydef/ applications/accounting/script/org/ofbiz/accounting/finaccount/ applications/ac...

erwan
Modified: ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java (original)
+++ ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java Mon Mar 26 20:56:02 2012
@@ -214,7 +214,7 @@ public class ShoppingCartItem implements
         // Timestamp nowTimestamp = UtilDateTime.nowTimestamp();
 
         // check to see if the product is fully configured
-        if ("AGGREGATED".equals(product.getString("productTypeId"))) {
+        if ("AGGREGATED".equals(product.getString("productTypeId")) || "AGGREGATED_SERVICE".equals(product.getString("productTypeId"))) {
             if (configWrapper == null || !configWrapper.isCompleted()) {
                 Map<String, Object> messageMap = UtilMisc.<String, Object>toMap("productName", product.getString("productName"),
                                                 "productId", product.getString("productId"));
@@ -484,7 +484,7 @@ public class ShoppingCartItem implements
              */
 
             // check to see if the product is fully configured
-            if ("AGGREGATED".equals(product.getString("productTypeId"))) {
+            if ("AGGREGATED".equals(product.getString("productTypeId"))|| "AGGREGATED_SERVICE".equals(product.getString("productTypeId"))) {
                 if (configWrapper == null || !configWrapper.isCompleted()) {
                     Map<String, Object> messageMap = UtilMisc.<String, Object>toMap("productName", product.getString("productName"),
                                                     "productId", product.getString("productId"));
@@ -1181,9 +1181,7 @@ public class ShoppingCartItem implements
                         if (UtilValidate.isNotEmpty(productSurvey) && UtilValidate.isNotEmpty(attributes)) {
                             List<String> surveyResponses = UtilGenerics.checkList(attributes.get("surveyResponses"));
                             if (UtilValidate.isNotEmpty(surveyResponses)) {
-                                Iterator<String> surveyItr = surveyResponses.iterator();
-                                while (surveyItr.hasNext()) {
-                                    String surveyResponseId = surveyItr.next();
+                                for(String surveyResponseId : surveyResponses) {
                                     // TODO: implement multiple survey per product
                                     if (UtilValidate.isNotEmpty(surveyResponseId)) {
                                         priceContext.put("surveyResponseId", surveyResponseId);
@@ -1612,7 +1610,7 @@ public class ShoppingCartItem implements
     }
 
     public void setOrderItemSeqId(String orderItemSeqId) {
-        Debug.log("Setting orderItemSeqId - " + orderItemSeqId, module);
+        Debug.logInfo("Setting orderItemSeqId - " + orderItemSeqId, module);
         this.orderItemSeqId = orderItemSeqId;
     }
 
@@ -1860,17 +1858,13 @@ public class ShoppingCartItem implements
                 Debug.logError(e, "Unable to get features from product : " + product.get("productId"), module);
             }
             if (featureAppls != null) {
-                Iterator<GenericValue> fai = featureAppls.iterator();
-                while (fai.hasNext()) {
-                    GenericValue appl = fai.next();
+                for(GenericValue appl : featureAppls) {
                     featureSet.add(appl.getString("productFeatureId"));
                 }
             }
         }
         if (this.additionalProductFeatureAndAppls != null) {
-            Iterator<GenericValue> aapi = this.additionalProductFeatureAndAppls.values().iterator();
-            while (aapi.hasNext()) {
-                GenericValue appl = aapi.next();
+            for(GenericValue appl : this.additionalProductFeatureAndAppls.values()) {
                 featureSet.add(appl.getString("productFeatureId"));
             }
         }
@@ -2070,7 +2064,7 @@ public class ShoppingCartItem implements
             }
         }
         rentalValue = rentalValue.add(new BigDecimal("100"));    // add final 100 percent for first person
-        //     Debug.log("rental parameters....Nbr of persons:" + getReservPersons() + " extra% 2nd person:" + getReserv2ndPPPerc()+ " extra% Nth person:" + getReservNthPPPerc() + "  total rental adjustment:" + rentalValue/100 * getReservLength());
+        //     Debug.logInfo("rental parameters....Nbr of persons:" + getReservPersons() + " extra% 2nd person:" + getReserv2ndPPPerc()+ " extra% Nth person:" + getReservNthPPPerc() + "  total rental adjustment:" + rentalValue/100 * getReservLength());
         return rentalValue.movePointLeft(2).multiply(getReservLength()); // return total rental adjustment
     }
 
@@ -2111,9 +2105,7 @@ public class ShoppingCartItem implements
 
     public void addAllProductFeatureAndAppls(Map<String, GenericValue> productFeatureAndApplsToAdd) {
         if (productFeatureAndApplsToAdd == null) return;
-        Iterator<GenericValue> productFeatureAndApplsToAddIter = productFeatureAndApplsToAdd.values().iterator();
-        while (productFeatureAndApplsToAddIter.hasNext()) {
-            GenericValue additionalProductFeatureAndAppl = productFeatureAndApplsToAddIter.next();
+        for (GenericValue additionalProductFeatureAndAppl : productFeatureAndApplsToAdd.values()) {
             this.putAdditionalProductFeatureAndAppl(additionalProductFeatureAndAppl);
         }
     }
@@ -2187,9 +2179,7 @@ public class ShoppingCartItem implements
                 Debug.logError(e, "Unable to get features from product : " + product.get("productId"), module);
             }
             if (featureAppls != null) {
-                Iterator<GenericValue> fai = featureAppls.iterator();
-                while (fai.hasNext()) {
-                    GenericValue appl = fai.next();
+                for(GenericValue appl : featureAppls) {
                     BigDecimal lastQuantity = featureMap.get(appl.getString("productFeatureId"));
                     if (lastQuantity == null) {
                         lastQuantity = BigDecimal.ZERO;
@@ -2200,9 +2190,7 @@ public class ShoppingCartItem implements
             }
         }
         if (this.additionalProductFeatureAndAppls != null) {
-            Iterator<GenericValue> aapi = this.additionalProductFeatureAndAppls.values().iterator();
-            while (aapi.hasNext()) {
-                GenericValue appl = aapi.next();
+            for(GenericValue appl : this.additionalProductFeatureAndAppls.values()) {
                 BigDecimal lastQuantity = featureMap.get(appl.getString("productFeatureId"));
                 if (lastQuantity == null) {
                     lastQuantity = BigDecimal.ZERO;
@@ -2360,6 +2348,13 @@ public class ShoppingCartItem implements
     public boolean equals(String productId, Timestamp reservStart, BigDecimal reservLength, BigDecimal reservPersons, String accommodationMapId, String accommodationSpotId,
             Map<String, GenericValue> additionalProductFeatureAndAppls, Map<String, Object> attributes, String prodCatalogId, BigDecimal selectedAmount,
             ProductConfigWrapper configWrapper, String itemType, ShoppingCart.ShoppingCartItemGroup itemGroup, boolean isPromo) {
+        return equals(productId, reservStart, reservLength, reservPersons, accommodationMapId, accommodationSpotId, additionalProductFeatureAndAppls, attributes, null, prodCatalogId, selectedAmount, configWrapper, itemType, itemGroup, isPromo);
+    }
+
+    /** Compares the specified object order item attributes. */
+    public boolean equals(String productId, Timestamp reservStart, BigDecimal reservLength, BigDecimal reservPersons, String accommodationMapId, String accommodationSpotId,
+            Map<String, GenericValue> additionalProductFeatureAndAppls, Map<String, Object> attributes, Map<String, String> orderItemAttributes, String prodCatalogId, BigDecimal selectedAmount,
+            ProductConfigWrapper configWrapper, String itemType, ShoppingCart.ShoppingCartItemGroup itemGroup, boolean isPromo) {
         if (this.productId == null || productId == null) {
             // all non-product items are unique
             return false;
@@ -2440,6 +2435,12 @@ public class ShoppingCartItem implements
             return false;
         }
 
+        if ((this.orderItemAttributes == null && UtilValidate.isNotEmpty(orderItemAttributes)) || (UtilValidate.isNotEmpty(this.orderItemAttributes) && orderItemAttributes == null) ||
+                (this.orderItemAttributes != null && orderItemAttributes != null && (this.orderItemAttributes.size() != orderItemAttributes.size() || !(this.orderItemAttributes.equals(orderItemAttributes))))) {
+            // order item attribute unique
+            return false;
+        }
+
         return true;
     }
 
@@ -2562,10 +2563,8 @@ public class ShoppingCartItem implements
             }
 
             // add the cloned item(s) to the cart
-            Iterator<ShoppingCartItem> newItemsItr = newItems.iterator();
-
-            while (newItemsItr.hasNext()) {
-                cart.addItem(thisIndex, newItemsItr.next());
+            for(ShoppingCartItem sci : newItems) {
+                cart.addItem(thisIndex, sci);
             }
         }
     }

Modified: ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java (original)
+++ ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java Mon Mar 26 20:56:02 2012
@@ -43,6 +43,7 @@ import org.ofbiz.entity.GenericValue;
 import org.ofbiz.entity.condition.EntityCondition;
 import org.ofbiz.entity.condition.EntityExpr;
 import org.ofbiz.entity.condition.EntityOperator;
+import org.ofbiz.entity.util.EntityTypeUtil;
 import org.ofbiz.entity.util.EntityUtil;
 import org.ofbiz.order.order.OrderReadHelper;
 import org.ofbiz.order.shoppingcart.ShoppingCart.CartShipInfo;
@@ -76,7 +77,7 @@ public class ShoppingCartServices {
             clearEmptyGroups = Boolean.TRUE;
         }
 
-        Debug.log("From Group - " + fromGroupIndex + " To Group - " + toGroupIndex + "Item - " + itemIndex + "(" + quantity + ")", module);
+        Debug.logInfo("From Group - " + fromGroupIndex + " To Group - " + toGroupIndex + "Item - " + itemIndex + "(" + quantity + ")", module);
         if (fromGroupIndex.equals(toGroupIndex)) {
             // nothing to do
             return ServiceUtil.returnSuccess();
@@ -84,7 +85,7 @@ public class ShoppingCartServices {
 
         cart.positionItemToGroup(itemIndex.intValue(), quantity,
                 fromGroupIndex.intValue(), toGroupIndex.intValue(), clearEmptyGroups.booleanValue());
-        Debug.log("Called cart.positionItemToGroup()", module);
+        Debug.logInfo("Called cart.positionItemToGroup()", module);
 
         return ServiceUtil.returnSuccess();
     }
@@ -288,10 +289,10 @@ public class ShoppingCartServices {
 
                 if ((overflow == null || !"Y".equals(overflow)) && oppi.hasNext()) {
                     cpi = cart.addPaymentAmount(paymentId, maxAmount);
-                    Debug.log("Added Payment: " + paymentId + " / " + maxAmount, module);
+                    Debug.logInfo("Added Payment: " + paymentId + " / " + maxAmount, module);
                 } else {
                     cpi = cart.addPayment(paymentId);
-                    Debug.log("Added Payment: " + paymentId + " / [no max]", module);
+                    Debug.logInfo("Added Payment: " + paymentId + " / [no max]", module);
                 }
                 // for finance account the finAccountId needs to be set
                 if ("FIN_ACCOUNT".equals(paymentId)) {
@@ -301,7 +302,7 @@ public class ShoppingCartServices {
                 cart.setBillingAccount(orderHeader.getString("billingAccountId"), orh.getBillingAccountMaxAmount());
             }
         } else {
-            Debug.log("No payment preferences found for order #" + orderId, module);
+            Debug.logInfo("No payment preferences found for order #" + orderId, module);
         }
 
         List<GenericValue> orderItemShipGroupList = orh.getOrderItemShipGroups();
@@ -449,7 +450,7 @@ public class ShoppingCartServices {
                     String configId = null;
                     try {
                         product = delegator.findByPrimaryKey("Product", UtilMisc.toMap("productId", productId));
-                        if ("AGGREGATED_CONF".equals(product.getString("productTypeId"))) {
+                        if (EntityTypeUtil.hasParentType(delegator, "ProductType", "productTypeId", product.getString("productTypeId"), "parentTypeId", "AGGREGATED")) {
                             List<GenericValue>productAssocs = delegator.findByAnd("ProductAssoc", UtilMisc.toMap("productAssocTypeId", "PRODUCT_CONF", "productIdTo", product.getString("productId")));
                             productAssocs = EntityUtil.filterByDate(productAssocs);
                             if (UtilValidate.isNotEmpty(productAssocs)) {
@@ -903,9 +904,7 @@ public class ShoppingCartServices {
 
             // The cart item adjustments, derived from quote item adjustments, are added to the cart
             if (quoteItems != null) {
-                Iterator<ShoppingCartItem> i = cart.iterator();
-                while (i.hasNext()) {
-                    ShoppingCartItem item = i.next();
+                for(ShoppingCartItem item : cart) {
                     String orderItemSeqId = item.getOrderItemSeqId();
                     if (orderItemSeqId != null) {
                         adjs = orderAdjsMap.get(orderItemSeqId);
@@ -1107,10 +1106,8 @@ public class ShoppingCartServices {
             result.put("displayGrandTotalCurrencyFormatted",org.ofbiz.base.util.UtilFormatOut.formatCurrency(shoppingCart.getDisplayGrandTotal(), isoCode, locale));
             BigDecimal orderAdjustmentsTotal = OrderReadHelper.calcOrderAdjustments(OrderReadHelper.getOrderHeaderAdjustments(shoppingCart.getAdjustments(), null), shoppingCart.getSubTotal(), true, true, true);
             result.put("displayOrderAdjustmentsTotalCurrencyFormatted", org.ofbiz.base.util.UtilFormatOut.formatCurrency(orderAdjustmentsTotal, isoCode, locale));
-            Iterator<ShoppingCartItem> i = shoppingCart.iterator();
             Map<String, Object> cartItemData = FastMap.newInstance();
-            while (i.hasNext()) {
-                ShoppingCartItem cartLine = i.next();
+            for(ShoppingCartItem cartLine : shoppingCart) {
                 int cartLineIndex = shoppingCart.getItemIndex(cartLine);
                 cartItemData.put("displayItemQty_" + cartLineIndex, cartLine.getQuantity());
                 cartItemData.put("displayItemPrice_" + cartLineIndex, org.ofbiz.base.util.UtilFormatOut.formatCurrency(cartLine.getDisplayPrice(), isoCode, locale));
@@ -1141,9 +1138,7 @@ public class ShoppingCartServices {
     public static Map<String, Object>resetShipGroupItems(DispatchContext dctx, Map<String, Object> context) {
         Map<String, Object> result = ServiceUtil.returnSuccess();
         ShoppingCart cart = (ShoppingCart) context.get("shoppingCart");
-        Iterator<ShoppingCartItem> sciIter = cart.iterator();
-        while (sciIter.hasNext()) {
-            ShoppingCartItem item = sciIter.next();
+        for(ShoppingCartItem item : cart) {
             cart.clearItemShipInfo(item);
             cart.setItemShipGroupQty(item, item.getQuantity(), 0);
         }
@@ -1165,9 +1160,7 @@ public class ShoppingCartServices {
             return ServiceUtil.returnError(e.toString());
         }
         Map<String, Object> vendorMap = FastMap.newInstance();
-        Iterator<ShoppingCartItem> sciIter = cart.iterator();
-        while (sciIter.hasNext()) {
-            ShoppingCartItem item = sciIter.next();
+        for(ShoppingCartItem item : cart) {
             GenericValue vendorProduct = null;
             String productId = item.getParentProductId();
             if (productId == null) {

Modified: ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java (original)
+++ ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java Mon Mar 26 20:56:02 2012
@@ -81,16 +81,12 @@ public class ProductDisplayWorker {
                 List<GenericValue> productsCategories = delegator.findByAndCache("ProductCategoryMember", UtilMisc.toMap("productId", item.getProductId()), null);
                 productsCategories = EntityUtil.filterByDate(productsCategories, true);
                 if (productsCategories != null) {
-                    Iterator<GenericValue> productsCategoriesIter = productsCategories.iterator();
-                    while (productsCategoriesIter.hasNext()) {
-                        GenericValue productsCategoryMember = productsCategoriesIter.next();
+                    for(GenericValue productsCategoryMember : productsCategories) {
                         GenericValue productsCategory = productsCategoryMember.getRelatedOneCache("ProductCategory");
                         if ("CROSS_SELL_CATEGORY".equals(productsCategory.getString("productCategoryTypeId"))) {
                             List<GenericValue> curPcms = productsCategory.getRelatedCache("ProductCategoryMember");
                             if (curPcms != null) {
-                                Iterator<GenericValue> curPcmsIter = curPcms.iterator();
-                                while (curPcmsIter.hasNext()) {
-                                    GenericValue curPcm = curPcmsIter.next();
+                                for(GenericValue curPcm : curPcms) {
                                     if (!products.containsKey(curPcm.getString("productId"))) {
                                         GenericValue product = curPcm.getRelatedOneCache("Product");
                                         products.put(product.getString("productId"), product);
@@ -102,9 +98,7 @@ public class ProductDisplayWorker {
                 }
 
                 if (UtilValidate.isNotEmpty(complementProducts)) {
-                    Iterator<GenericValue> complIter = complementProducts.iterator();
-                    while (complIter.hasNext()) {
-                        GenericValue productAssoc = complIter.next();
+                    for(GenericValue productAssoc : complementProducts) {
                         if (!products.containsKey(productAssoc.getString("productIdTo"))) {
                             GenericValue product = productAssoc.getRelatedOneCache("AssocProduct");
                             products.put(product.getString("productId"), product);
@@ -238,9 +232,7 @@ public class ProductDisplayWorker {
             // remove all products that are already in the cart
             ShoppingCart cart = (ShoppingCart) httpRequest.getSession().getAttribute("shoppingCart");
             if (UtilValidate.isNotEmpty(cart)) {
-                Iterator<ShoppingCartItem> cartiter = cart.iterator();
-                while (cartiter.hasNext()) {
-                    ShoppingCartItem item = cartiter.next();
+                for(ShoppingCartItem item : cart) {
                     String productId = item.getProductId();
                     products.remove(productId);
                     productQuantities.remove(productId);

Modified: ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java (original)
+++ ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java Mon Mar 26 20:56:02 2012
@@ -328,9 +328,7 @@ public class ProductPromoWorker {
             // before sorting split into two lists and sort each list; one list for promos that have a order total condition, and the other list for all promos that don't; then we'll always run the ones that have no condition on the order total first
             List<Map<Object, Object>> productPromoDiscountMapList = FastList.newInstance();
             List<Map<Object, Object>> productPromoDiscountMapListOrderTotal = FastList.newInstance();
-            Iterator<GenericValue> productPromoIter = productPromoList.iterator();
-            while (productPromoIter.hasNext()) {
-                GenericValue productPromo = productPromoIter.next();
+            for(GenericValue productPromo : productPromoList) {
                 Map<Object, Object> productPromoDiscountMap = UtilGenerics.checkMap(UtilMisc.toMap("productPromo", productPromo, "totalDiscountAmount", cart.getProductPromoUseTotalDiscount(productPromo.getString("productPromoId"))));
                 if (hasOrderTotalCondition(productPromo, delegator)) {
                     productPromoDiscountMapListOrderTotal.add(productPromoDiscountMap);
@@ -370,9 +368,7 @@ public class ProductPromoWorker {
     protected static boolean hasOrderTotalCondition(GenericValue productPromo, Delegator delegator) throws GenericEntityException {
         boolean hasOtCond = false;
         List<GenericValue> productPromoConds = delegator.findByAndCache("ProductPromoCond", UtilMisc.toMap("productPromoId", productPromo.get("productPromoId")), UtilMisc.toList("productPromoCondSeqId"));
-        Iterator<GenericValue> productPromoCondIter = productPromoConds.iterator();
-        while (productPromoCondIter.hasNext()) {
-            GenericValue productPromoCond = productPromoCondIter.next();
+        for(GenericValue productPromoCond : productPromoConds) {
             String inputParamEnumId = productPromoCond.getString("inputParamEnumId");
             if ("PPIP_ORDER_TOTAL".equals(inputParamEnumId)) {
                 hasOtCond = true;
@@ -405,9 +401,7 @@ public class ProductPromoWorker {
                     break;
                 }
 
-                Iterator<GenericValue> productPromoIter = productPromoList.iterator();
-                while (productPromoIter.hasNext()) {
-                    GenericValue productPromo = productPromoIter.next();
+                for(GenericValue productPromo : productPromoList) {
                     String productPromoId = productPromo.getString("productPromoId");
 
                     List<GenericValue> productPromoRules = productPromo.getRelatedCache("ProductPromoRule", null, null);
@@ -742,7 +736,7 @@ public class ProductPromoWorker {
     }
 
     protected static boolean runProductPromoRules(ShoppingCart cart, boolean cartChanged, Long useLimit, boolean requireCode, String productPromoCodeId, Long codeUseLimit, long maxUseLimit,
-            GenericValue productPromo, List<GenericValue> productPromoRules, LocalDispatcher dispatcher, Delegator delegator, Timestamp nowTimestamp) throws GenericEntityException, UseLimitException {
+        GenericValue productPromo, List<GenericValue> productPromoRules, LocalDispatcher dispatcher, Delegator delegator, Timestamp nowTimestamp) throws GenericEntityException, UseLimitException {
         String productPromoId = productPromo.getString("productPromoId");
         while ((useLimit == null || useLimit.longValue() > cart.getProductPromoUseCount(productPromoId)) &&
                 (!requireCode || UtilValidate.isNotEmpty(productPromoCodeId)) &&
@@ -824,8 +818,9 @@ public class ProductPromoWorker {
         String inputParamEnumId = productPromoCond.getString("inputParamEnumId");
         String operatorEnumId = productPromoCond.getString("operatorEnumId");
         String shippingMethod = "";
-
+        String carrierPartyId = "";
         if (otherValue != null && otherValue.contains("@")) {
+            carrierPartyId = otherValue.substring(0, otherValue.indexOf("@"));
             shippingMethod = otherValue.substring(otherValue.indexOf("@")+1);
             otherValue = "";
         }
@@ -919,9 +914,7 @@ public class ProductPromoWorker {
                 Set<String> productIds = ProductPromoWorker.getPromoRuleCondProductIds(productPromoCond, delegator, nowTimestamp);
 
                 List<ShoppingCartItem> lineOrderedByBasePriceList = cart.getLineListOrderedByBasePrice(false);
-                Iterator<ShoppingCartItem> lineOrderedByBasePriceIter = lineOrderedByBasePriceList.iterator();
-                while (lineOrderedByBasePriceIter.hasNext()) {
-                    ShoppingCartItem cartItem = lineOrderedByBasePriceIter.next();
+                for(ShoppingCartItem cartItem : lineOrderedByBasePriceList) {
                     // only include if it is in the productId Set for this check and if it is not a Promo (GWP) item
                     GenericValue product = cartItem.getProduct();
                     String parentProductId = cartItem.getParentProductId();
@@ -1219,7 +1212,7 @@ public class ProductPromoWorker {
                     }
                 }
             }
-        } else if ("PPIP_ORDER_SHIPTOTAL".equals(inputParamEnumId) && shippingMethod.equals(cart.getShipmentMethodTypeId())) {
+        } else if ("PPIP_ORDER_SHIPTOTAL".equals(inputParamEnumId) && shippingMethod.equals(cart.getShipmentMethodTypeId()) && carrierPartyId.equals(cart.getCarrierPartyId())) {
             if (UtilValidate.isNotEmpty(condValue)) {
                 BigDecimal orderTotalShipping = cart.getTotalShipping();
                 if (Debug.verboseOn()) { Debug.logVerbose("Doing order total Shipping compare: ordertotalShipping=" + orderTotalShipping, module); }
@@ -1407,9 +1400,7 @@ public class ProductPromoWorker {
                     if ("Y".equals(productPromoAction.get("useCartQuantity"))) {
                         quantity = BigDecimal.ZERO;
                         List<ShoppingCartItem> used = getCartItemsUsed(cart, productPromoAction);
-                        Iterator<ShoppingCartItem> usedIt = used.iterator();
-                        while (usedIt.hasNext()) {
-                            ShoppingCartItem item = usedIt.next();
+                        for(ShoppingCartItem item : used) {
                             BigDecimal available = item.getPromoQuantityAvailable();
                             quantity = quantity.add(available).add(item.getPromoQuantityCandidateUseActionAndAllConds(productPromoAction));
                             item.addPromoQuantityCandidateUse(available, productPromoAction, false);
@@ -1434,9 +1425,7 @@ public class ProductPromoWorker {
                     if ("Y".equals(product.getString("isVirtual"))) {
                         List<GenericValue> productAssocs = EntityUtil.filterByDate(product.getRelatedCache("MainProductAssoc",
                                 UtilMisc.toMap("productAssocTypeId", "PRODUCT_VARIANT"), UtilMisc.toList("sequenceNum")));
-                        Iterator<GenericValue> productAssocIter = productAssocs.iterator();
-                        while (productAssocIter.hasNext()) {
-                            GenericValue productAssoc = productAssocIter.next();
+                        for(GenericValue productAssoc : productAssocs) {
                             optionProductIds.add(productAssoc.getString("productIdTo"));
                         }
                         productId = null;
@@ -1728,9 +1717,7 @@ public class ProductPromoWorker {
             Set<String> productIds = ProductPromoWorker.getPromoRuleActionProductIds(productPromoAction, delegator, nowTimestamp);
 
             // go through the cart items and for each product that has a specialPromoPrice use that price
-            Iterator<ShoppingCartItem> cartItemIter = cart.items().iterator();
-            while (cartItemIter.hasNext()) {
-                ShoppingCartItem cartItem = cartItemIter.next();
+            for(ShoppingCartItem cartItem : cart.items()) {
                 String itemProductId = cartItem.getProductId();
                 if (UtilValidate.isEmpty(itemProductId)) {
                     continue;
@@ -1796,9 +1783,7 @@ public class ProductPromoWorker {
 
     protected static List<ShoppingCartItem> getCartItemsUsed(ShoppingCart cart, GenericValue productPromoAction) {
         List<ShoppingCartItem> cartItemsUsed = FastList.newInstance();
-        Iterator<ShoppingCartItem> cartItemsIter = cart.iterator();
-        while (cartItemsIter.hasNext()) {
-            ShoppingCartItem cartItem = cartItemsIter.next();
+        for(ShoppingCartItem cartItem : cart) {
             BigDecimal quantityUsed = cartItem.getPromoQuantityCandidateUseActionAndAllConds(productPromoAction);
             if (quantityUsed.compareTo(BigDecimal.ZERO) > 0) {
                 cartItemsUsed.add(cartItem);
@@ -1809,9 +1794,7 @@ public class ProductPromoWorker {
 
     protected static BigDecimal getCartItemsUsedTotalAmount(ShoppingCart cart, GenericValue productPromoAction) {
         BigDecimal totalAmount = BigDecimal.ZERO;
-        Iterator<ShoppingCartItem> cartItemsIter = cart.iterator();
-        while (cartItemsIter.hasNext()) {
-            ShoppingCartItem cartItem = cartItemsIter.next();
+        for(ShoppingCartItem cartItem : cart) {
             BigDecimal quantityUsed = cartItem.getPromoQuantityCandidateUseActionAndAllConds(productPromoAction);
             if (quantityUsed.compareTo(BigDecimal.ZERO) > 0) {
                 totalAmount = totalAmount.add(quantityUsed.multiply(cartItem.getBasePrice()));
@@ -1993,9 +1976,7 @@ public class ProductPromoWorker {
         List<GenericValue> productPromoProductsAction = FastList.newInstance();
         List<GenericValue> productPromoCategoriesAction = FastList.newInstance();
 
-        Iterator<GenericValue> productPromoProductsAllIter = productPromoProductsAll.iterator();
-        while (productPromoProductsAllIter.hasNext()) {
-            GenericValue productPromoProduct = productPromoProductsAllIter.next();
+        for(GenericValue productPromoProduct : productPromoProductsAll) {
             // if the rule id is null then this is a global promo one, so always include
             if (!"_NA_".equals(productPromoProduct.getString("productPromoCondSeqId")) || "_NA_".equals(productPromoProduct.getString("productPromoRuleId"))) {
                 productPromoProductsCond.add(productPromoProduct);
@@ -2004,9 +1985,7 @@ public class ProductPromoWorker {
                 productPromoProductsAction.add(productPromoProduct);
             }
         }
-        Iterator<GenericValue> productPromoCategoriesAllIter = productPromoCategoriesAll.iterator();
-        while (productPromoCategoriesAllIter.hasNext()) {
-            GenericValue productPromoCategory = productPromoCategoriesAllIter.next();
+        for(GenericValue productPromoCategory : productPromoCategoriesAll) {
             if (!"_NA_".equals(productPromoCategory.getString("productPromoCondSeqId")) || "_NA_".equals(productPromoCategory.getString("productPromoRuleId"))) {
                 productPromoCategoriesCond.add(productPromoCategory);
             }
@@ -2053,9 +2032,7 @@ public class ProductPromoWorker {
         Set<String> productCategoryIds = FastSet.newInstance();
         Map<String, List<Set<String>>> productCategoryGroupSetListMap = FastMap.newInstance();
 
-        Iterator<GenericValue> productPromoCategoryIter = productPromoCategories.iterator();
-        while (productPromoCategoryIter.hasNext()) {
-            GenericValue productPromoCategory = productPromoCategoryIter.next();
+        for(GenericValue productPromoCategory : productPromoCategories) {
             if (productPromoApplEnumId.equals(productPromoCategory.getString("productPromoApplEnumId"))) {
                 Set<String> tempCatIdSet = FastSet.newInstance();
                 if ("Y".equals(productPromoCategory.getString("includeSubCategories"))) {
@@ -2103,17 +2080,13 @@ public class ProductPromoWorker {
         // now handle the productCategoryGroupSetListMap
         // if a set has more than one category (because of an include sub-cats) then do an or
         // all lists will have more than category because of the pre-pass that was done, so and them together
-        Iterator<Map.Entry<String, List<Set<String>>>> pcgslmIter = productCategoryGroupSetListMap.entrySet().iterator();
-        while (pcgslmIter.hasNext()) {
-            Map.Entry<String, List<Set<String>>> entry = pcgslmIter.next();
+        for(Map.Entry<String, List<Set<String>>> entry : productCategoryGroupSetListMap.entrySet()) {
             List<Set<String>> catIdSetList = entry.getValue();
             // get all productIds for this catIdSetList
             List<Set<String>> productIdSetList = FastList.newInstance();
 
-            Iterator<Set<String>> cidslIter = catIdSetList.iterator();
-            while (cidslIter.hasNext()) {
+            for(Set<String> catIdSet : catIdSetList) {
                 // make a Set of productIds including all ids from all categories
-                Set<String> catIdSet = cidslIter.next();
                 Set<String> groupProductIdSet = FastSet.newInstance();
                 getAllProductIds(catIdSet, groupProductIdSet, delegator, nowTimestamp, true);
                 productIdSetList.add(groupProductIdSet);
@@ -2122,9 +2095,7 @@ public class ProductPromoWorker {
             // now go through all productId sets and only include IDs that are in all sets
             // by definition if each id must be in all categories, then it must be in the first, so go through the first and drop each one that is not in all others
             Set<String> firstProductIdSet = productIdSetList.remove(0);
-            Iterator<Set<String>> productIdSetIter = productIdSetList.iterator();
-            while (productIdSetIter.hasNext()) {
-                Set<String> productIdSet = productIdSetIter.next();
+            for(Set<String> productIdSet : productIdSetList) {
                 firstProductIdSet.retainAll(productIdSet);
             }
 
@@ -2160,15 +2131,11 @@ public class ProductPromoWorker {
     }
 
     protected static void getAllProductIds(Set<String> productCategoryIdSet, Set<String> productIdSet, Delegator delegator, Timestamp nowTimestamp, boolean include) throws GenericEntityException {
-        Iterator<String> productCategoryIdIter = productCategoryIdSet.iterator();
-        while (productCategoryIdIter.hasNext()) {
-            String productCategoryId = productCategoryIdIter.next();
+        for(String productCategoryId : productCategoryIdSet) {
             // get all product category memebers, filter by date
             List<GenericValue> productCategoryMembers = delegator.findByAndCache("ProductCategoryMember", UtilMisc.toMap("productCategoryId", productCategoryId));
             productCategoryMembers = EntityUtil.filterByDate(productCategoryMembers, nowTimestamp);
-            Iterator<GenericValue> productCategoryMemberIter = productCategoryMembers.iterator();
-            while (productCategoryMemberIter.hasNext()) {
-                GenericValue productCategoryMember = productCategoryMemberIter.next();
+            for(GenericValue productCategoryMember : productCategoryMembers) {
                 String productId = productCategoryMember.getString("productId");
                 if (include) {
                     productIdSet.add(productId);
@@ -2181,9 +2148,7 @@ public class ProductPromoWorker {
 
     protected static void handleProductPromoProducts(Set<String> productIds, List<GenericValue> productPromoProducts, String productPromoApplEnumId) throws GenericEntityException {
         boolean include = !"PPPA_EXCLUDE".equals(productPromoApplEnumId);
-        Iterator<GenericValue> productPromoProductIter = productPromoProducts.iterator();
-        while (productPromoProductIter.hasNext()) {
-            GenericValue productPromoProduct = productPromoProductIter.next();
+        for(GenericValue productPromoProduct : productPromoProducts) {
             if (productPromoApplEnumId.equals(productPromoProduct.getString("productPromoApplEnumId"))) {
                 String productId = productPromoProduct.getString("productId");
                 if (include) {

Modified: ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java (original)
+++ ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java Mon Mar 26 20:56:02 2012
@@ -324,7 +324,7 @@ public class ShippingEvents {
                 // invoke the service
                 Map<String, Object> serviceResp = null;
                 try {
-                    Debug.log("Service : " + serviceName + " / shipmentGatewayConfigId : " + shipmentGatewayConfigId + " / configProps : " + configProps + " -- " + context, module);
+                    Debug.logInfo("Service : " + serviceName + " / shipmentGatewayConfigId : " + shipmentGatewayConfigId + " / configProps : " + configProps + " -- " + context, module);
                     // because we don't want to blow up too big or rollback the transaction when this happens, always have it run in its own transaction...
                     serviceResp = dispatcher.runSync(serviceName, context, 0, true);
                 } catch (GenericServiceException e) {

Modified: ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListEvents.java?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListEvents.java (original)
+++ ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListEvents.java Mon Mar 26 20:56:02 2012
@@ -20,11 +20,12 @@ package org.ofbiz.order.shoppinglist;
 
 import java.math.BigDecimal;
 import java.sql.Timestamp;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
+import java.util.Properties;
 
+import javax.servlet.http.Cookie;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
@@ -226,9 +227,7 @@ public class ShoppingListEvents {
             // include all items of child lists if flagged to do so
             if (includeChild) {
                 List<GenericValue> childShoppingLists = shoppingList.getRelated("ChildShoppingList");
-                Iterator<GenericValue> ci = childShoppingLists.iterator();
-                while (ci.hasNext()) {
-                    GenericValue v = ci.next();
+                for(GenericValue v : childShoppingLists) {
                     List<GenericValue> items = v.getRelated("ShoppingListItem");
                     shoppingListItems.addAll(items);
                 }
@@ -258,9 +257,7 @@ public class ShoppingListEvents {
 
         // add the items
         StringBuilder eventMessage = new StringBuilder();
-        Iterator<GenericValue> i = shoppingListItems.iterator();
-        while (i.hasNext()) {
-            GenericValue shoppingListItem = i.next();
+        for(GenericValue shoppingListItem : shoppingListItems) {
             String productId = shoppingListItem.getString("productId");
             BigDecimal quantity = shoppingListItem.getBigDecimal("quantity");
             Timestamp reservStart = shoppingListItem.getTimestamp("reservStart");
@@ -554,10 +551,8 @@ public class ShoppingListEvents {
      */
     public static int makeListItemSurveyResp(Delegator delegator, GenericValue item, List<String> surveyResps) throws GenericEntityException {
         if (UtilValidate.isNotEmpty(surveyResps)) {
-            Iterator<String> i = surveyResps.iterator();
             int count = 0;
-            while (i.hasNext()) {
-                String responseId = i.next();
+            for(String responseId : surveyResps) {
                 GenericValue listResp = delegator.makeValue("ShoppingListItemSurvey");
                 listResp.set("shoppingListId", item.getString("shoppingListId"));
                 listResp.set("shoppingListItemSeqId", item.getString("shoppingListItemSeqId"));
@@ -576,9 +571,7 @@ public class ShoppingListEvents {
     public static Map<String, List<String>> getItemSurveyInfos(List<GenericValue> items) {
         Map<String, List<String>> surveyInfos = FastMap.newInstance();
         if (UtilValidate.isNotEmpty(items)) {
-            Iterator<GenericValue> itemIt = items.iterator();
-            while (itemIt.hasNext()) {
-                GenericValue item = itemIt.next();
+            for(GenericValue item : items) {
                 String listId = item.getString("shoppingListId");
                 String itemId = item.getString("shoppingListItemSeqId");
                 surveyInfos.put(listId + "." + itemId, getItemSurveyInfo(item));
@@ -601,9 +594,7 @@ public class ShoppingListEvents {
         }
 
         if (UtilValidate.isNotEmpty(surveyResp)) {
-            Iterator<GenericValue> respIt = surveyResp.iterator();
-            while (respIt.hasNext()) {
-                GenericValue resp = respIt.next();
+            for(GenericValue resp : surveyResp) {
                 responseIds.add(resp.getString("surveyResponseId"));
             }
         }
@@ -627,4 +618,80 @@ public class ShoppingListEvents {
         }
         return arr;
     }
-}
+    
+    /**
+     * Create the guest cookies for a shopping list
+     */
+    public static String createGuestShoppingListCookies (HttpServletRequest request, HttpServletResponse response){
+        Delegator delegator = (Delegator) request.getAttribute("delegator");
+        LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
+        HttpSession session = request.getSession(true);
+        ShoppingCart cart = (ShoppingCart) session.getAttribute("shoppingCart");
+        GenericValue userLogin = (GenericValue) session.getAttribute("userLogin");
+        Properties systemProps = System.getProperties();
+        String guestShoppingUserName = "GuestShoppingListId_" + systemProps.getProperty("user.name").replace(" ", "_");
+        String productStoreId = ProductStoreWorker.getProductStoreId(request);
+        int cookieAge = (60 * 60 * 24 * 30);
+        String autoSaveListId = null;
+        Cookie[] cookies = request.getCookies();
+        
+        // check userLogin
+        if (UtilValidate.isNotEmpty(userLogin)) {
+            String partyId = userLogin.getString("partyId");
+            if (UtilValidate.isEmpty(partyId)) {
+                return "success";
+            }
+        }
+        
+        // find shopping list ID
+        if (cookies != null) {
+            for (Cookie cookie: cookies) {
+                if (cookie.getName().equals(guestShoppingUserName)) {
+                    autoSaveListId = cookie.getValue();
+                    break;
+                }
+            }
+        }
+        
+        // clear the auto-save info
+        if (ProductStoreWorker.autoSaveCart(delegator, productStoreId)) {
+            if (UtilValidate.isEmpty(autoSaveListId)) {
+                try {
+                    Map<String, Object> listFields = UtilMisc.<String, Object>toMap("userLogin", userLogin, "productStoreId", productStoreId, "shoppingListTypeId", "SLT_SPEC_PURP", "listName", PERSISTANT_LIST_NAME);
+                    Map<String, Object> newListResult = dispatcher.runSync("createShoppingList", listFields);
+                    if (newListResult != null) {
+                        autoSaveListId = (String) newListResult.get("shoppingListId");
+                    }
+                } catch (GeneralException e) {
+                    Debug.logError(e, module);
+                }
+                Cookie guestShoppingListCookie = new Cookie(guestShoppingUserName, autoSaveListId);
+                guestShoppingListCookie.setMaxAge(cookieAge);
+                guestShoppingListCookie.setPath("/");
+                response.addCookie(guestShoppingListCookie);
+            }
+        }
+        if (UtilValidate.isNotEmpty(autoSaveListId)) {
+            if (UtilValidate.isNotEmpty(cart)) {
+                cart.setAutoSaveListId(autoSaveListId);
+            } else {
+                cart = ShoppingCartEvents.getCartObject(request);
+                cart.setAutoSaveListId(autoSaveListId);
+            }
+        }
+        return "success";
+    }
+    
+    /**
+     * Clear the guest cookies for a shopping list
+     */
+    public static String clearGuestShoppingListCookies (HttpServletRequest request, HttpServletResponse response){
+        Properties systemProps = System.getProperties();
+        String guestShoppingUserName = "GuestShoppingListId_" + systemProps.getProperty("user.name").replace(" ", "_");
+        Cookie guestShoppingListCookie = new Cookie(guestShoppingUserName, null);
+        guestShoppingListCookie.setMaxAge(0);
+        guestShoppingListCookie.setPath("/");
+        response.addCookie(guestShoppingListCookie);
+        return "success";
+    }
+}
\ No newline at end of file

Modified: ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java (original)
+++ ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java Mon Mar 26 20:56:02 2012
@@ -20,7 +20,6 @@ package org.ofbiz.order.shoppinglist;
 
 import java.math.BigDecimal;
 import java.sql.Timestamp;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Locale;
 import java.util.Date;
@@ -42,6 +41,7 @@ import org.ofbiz.entity.condition.Entity
 import org.ofbiz.entity.condition.EntityOperator;
 import org.ofbiz.entity.transaction.TransactionUtil;
 import org.ofbiz.entity.util.EntityListIterator;
+import org.ofbiz.entity.util.EntityTypeUtil;
 import org.ofbiz.entity.util.EntityUtil;
 import org.ofbiz.order.order.OrderReadHelper;
 import org.ofbiz.order.shoppingcart.CartItemModifyException;
@@ -112,7 +112,7 @@ public class ShoppingListServices {
             return ServiceUtil.returnError(UtilProperties.getMessage(resource_error,"OrderUnableToCreateShoppingListRecurrenceInformation",locale));
         }
 
-        Debug.log("Next Recurrence - " + UtilDateTime.getTimestamp(recInfo.next()), module);
+        Debug.logInfo("Next Recurrence - " + UtilDateTime.getTimestamp(recInfo.next()), module);
         Map<String, Object> result = ServiceUtil.returnSuccess();
         result.put("recurrenceInfoId", recInfo.getID());
 
@@ -325,15 +325,12 @@ public class ShoppingListServices {
             }
 
             List<GenericValue> orderItems = orh.getOrderItems();
-            Iterator<GenericValue> i = orderItems.iterator();
-            String productId = null;
-            while (i.hasNext()) {
-                GenericValue orderItem = i.next();
-                productId = orderItem.getString("productId");
+            for(GenericValue orderItem : orderItems) {
+                String productId = orderItem.getString("productId");
                 if (UtilValidate.isNotEmpty(productId)) {
                     Map<String, Object> ctx = UtilMisc.<String, Object>toMap("userLogin", userLogin, "shoppingListId", shoppingListId, "productId",
                             orderItem.get("productId"), "quantity", orderItem.get("quantity"));
-                    if ("AGGREGATED_CONF".equals(ProductWorker.getProductTypeId(delegator, productId))) {
+                    if (EntityTypeUtil.hasParentType(delegator, "ProductType", "productTypeId", ProductWorker.getProductTypeId(delegator, productId), "parentTypeId", "AGGREGATED")) {
                         try {
                             GenericValue instanceProduct = delegator.findByPrimaryKey("Product", UtilMisc.toMap("productId", productId));
                             String configId = instanceProduct.getString("configId");
@@ -470,10 +467,8 @@ public class ShoppingListServices {
                 }
 
 
-                Iterator<GenericValue> i = items.iterator();
                 ProductConfigWrapper configWrapper = null;
-                while (i.hasNext()) {
-                    GenericValue shoppingListItem = i.next();
+                for(GenericValue shoppingListItem : items) {
                     String productId = shoppingListItem.getString("productId");
                     BigDecimal quantity = shoppingListItem.getBigDecimal("quantity");
                     Timestamp reservStart = shoppingListItem.getTimestamp("reservStart");
@@ -564,9 +559,7 @@ public class ShoppingListServices {
         String orderId = (String) context.get("orderId");
         try {
             List<GenericValue> orderItems = delegator.findByAnd("OrderItem", UtilMisc.toMap("orderId", orderId));
-            Iterator<GenericValue> iter = orderItems.iterator();
-            while (iter.hasNext()) {
-                GenericValue orderItem = iter.next();
+            for(GenericValue orderItem : orderItems) {
                 String shoppingListId = orderItem.getString("shoppingListId");
                 String shoppingListItemSeqId = orderItem.getString("shoppingListItemSeqId");
                 if (UtilValidate.isNotEmpty(shoppingListId)) {
@@ -585,7 +578,7 @@ public class ShoppingListServices {
                 }
             }
         } catch (Exception e) {
-            Debug.log("updateShoppingListQuantitiesFromOrder error:"+e.getMessage());
+            Debug.logInfo("updateShoppingListQuantitiesFromOrder error:"+e.getMessage(), module);
         }
         return result;
     }

Modified: ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/test/OrderTestServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/test/OrderTestServices.java?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/test/OrderTestServices.java (original)
+++ ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/test/OrderTestServices.java Mon Mar 26 20:56:02 2012
@@ -19,7 +19,6 @@
 package org.ofbiz.order.test;
 
 import java.math.BigDecimal;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
@@ -96,9 +95,7 @@ public class OrderTestServices {
                 if (result.get("categoryMembers") != null) {
                     List<GenericValue> productCategoryMembers = UtilGenerics.checkList(result.get("categoryMembers"));
                     if (productCategoryMembers != null) {
-                        Iterator<GenericValue> i = productCategoryMembers.iterator();
-                        while (i.hasNext()) {
-                            GenericValue prodCatMemb = i.next();
+                        for(GenericValue prodCatMemb : productCategoryMembers) {
                             if (prodCatMemb != null) {
                                 productsList.add(prodCatMemb.getString("productId"));
                             }

Modified: ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java (original)
+++ ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java Mon Mar 26 20:56:02 2012
@@ -67,7 +67,7 @@ public class ExpressCheckoutEvents {
             try {
                 result = dispatcher.runSync(serviceName, inMap);
             } catch (GenericServiceException e) {
-                Debug.log(e, module);
+                Debug.logInfo(e, module);
                 request.setAttribute("_EVENT_MESSAGE_", UtilProperties.getMessage(resourceErr, "AccountingPayPalCommunicationError", locale));
                 return "error";
             }

Modified: ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java (original)
+++ ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java Mon Mar 26 20:56:02 2012
@@ -146,7 +146,7 @@ public class ZipSalesServices {
                 }
 
                 // console log
-                Debug.log(newValue.get("zipCode") + "/" + newValue.get("stateCode") + "/" + newValue.get("city") + "/" + newValue.get("county") + "/" + newValue.get("fromDate"));
+                Debug.logInfo(newValue.get("zipCode") + "/" + newValue.get("stateCode") + "/" + newValue.get("city") + "/" + newValue.get("county") + "/" + newValue.get("fromDate"), module);
             }
         }
 
@@ -202,7 +202,7 @@ public class ZipSalesServices {
                     }
 
                     // console log
-                    Debug.log(newValue.get("stateCode") + "/" + newValue.get("city") + "/" + newValue.get("county") + "/" + newValue.get("fromDate"));
+                    Debug.logInfo(newValue.get("stateCode") + "/" + newValue.get("city") + "/" + newValue.get("county") + "/" + newValue.get("fromDate"), module);
                 }
             }
         }
@@ -362,13 +362,11 @@ public class ZipSalesServices {
         }
 
         if (ruleLookup != null) {
-            Iterator<GenericValue> ruleIterator = ruleLookup.iterator();
-            while (ruleIterator.hasNext()) {
+            for(GenericValue rule : ruleLookup) {
                 if (!taxShipping) {
                     // if we found an rule which passes no need to contine (all rules are ||)
                     break;
                 }
-                GenericValue rule = ruleIterator.next();
                 String idCode = rule.getString("idCode");
                 String taxable = rule.getString("taxable");
                 String condition = rule.getString("shipCond");
@@ -468,10 +466,10 @@ public class ZipSalesServices {
 
         BigDecimal taxableAmount = itemAmount;
         if (taxShipping) {
-            //Debug.log("Taxing shipping", module);
+            //Debug.logInfo("Taxing shipping", module);
             taxableAmount = taxableAmount.add(shippingAmount);
         } else {
-            Debug.log("Shipping is not taxable", module);
+            Debug.logInfo("Shipping is not taxable", module);
         }
 
         // calc tax amount

Modified: ofbiz/branches/20111205EmailHandling/applications/order/testdef/ShoppingCartTests.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/order/testdef/ShoppingCartTests.xml?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/applications/order/testdef/ShoppingCartTests.xml (original)
+++ ofbiz/branches/20111205EmailHandling/applications/order/testdef/ShoppingCartTests.xml Mon Mar 26 20:56:02 2012
@@ -36,4 +36,8 @@ under the License.
     <test-case case-name="loadCartFromQuote-test">
         <simple-method-test location="component://order/script/org/ofbiz/order/test/ShoppingCartTests.xml" name="testLoadCartFromQuote"/>
     </test-case>
+    
+    <test-case case-name="configurableServiceOrder-test">
+        <simple-method-test location="component://order/script/org/ofbiz/order/test/ShoppingCartTests.xml" name="testCreateOrderConfigurableServiceProduct"/>
+    </test-case>
 </test-suite>

Modified: ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/WEB-INF/actions/entry/CheckoutOptions.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/WEB-INF/actions/entry/CheckoutOptions.groovy?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/WEB-INF/actions/entry/CheckoutOptions.groovy (original)
+++ ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/WEB-INF/actions/entry/CheckoutOptions.groovy Mon Mar 26 20:56:02 2012
@@ -36,11 +36,8 @@ if (shoppingCart) {
     shippingEstWpr = new ShippingEstimateWrapper(dispatcher, shoppingCart, 0);
     context.shippingEstWpr = shippingEstWpr;
     context.carrierShipmentMethodList = shippingEstWpr.getShippingMethods();
-}
-
-// Reassign items requiring drop-shipping to new or existing drop-ship groups
-if (shoppingCart) {
-    shoppingCart.createDropShipGroups(dispatcher);
+    // Reassign items requiring drop-shipping to new or existing drop-ship groups
+    shoppingCart.createDropShipGroups(dispatcher);    
 }
 
 profiledefs = delegator.findByPrimaryKey("PartyProfileDefault", [partyId : userLogin.partyId, productStoreId : productStoreId]);

Modified: ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/WEB-INF/actions/entry/cart/LookupBulkAddProducts.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/WEB-INF/actions/entry/cart/LookupBulkAddProducts.groovy?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/WEB-INF/actions/entry/cart/LookupBulkAddProducts.groovy (original)
+++ ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/WEB-INF/actions/entry/cart/LookupBulkAddProducts.groovy Mon Mar 26 20:56:02 2012
@@ -38,6 +38,7 @@ if (productId) {
 
 // do not include configurable products
 conditionList.add(EntityCondition.makeCondition("productTypeId", EntityOperator.NOT_EQUAL, "AGGREGATED"));
+conditionList.add(EntityCondition.makeCondition("productTypeId", EntityOperator.NOT_EQUAL, "AGGREGATED_SERVICE"));
 
 // no virtual products: note that isVirtual could be null,
 // we consider those products to be non-virtual and hence addable to the order in bulk

Modified: ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/CategoryDetail.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/CategoryDetail.groovy?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/CategoryDetail.groovy (original)
+++ ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/CategoryDetail.groovy Mon Mar 26 20:56:02 2012
@@ -18,12 +18,14 @@
  */
 
 /*
- * NOTE: This script is also referenced by the ecommerce's screens and
+ * NOTE: This script is also referenced by the webpos and ecommerce's screens and
  * should not contain order component's specific code.
  */
 
 import org.ofbiz.base.util.*;
 import org.ofbiz.entity.*;
+import org.ofbiz.entity.condition.*;
+import org.ofbiz.entity.util.*;
 import org.ofbiz.service.*;
 import org.ofbiz.product.catalog.*;
 import org.ofbiz.product.category.CategoryContentWrapper;
@@ -68,11 +70,29 @@ if(productStore) {
     if("N".equals(productStore.showOutOfStockProducts)) {
         productsInStock = [];
         productCategoryMembers.each { productCategoryMember ->
-            productFacility = delegator.findOne("ProductFacility", [productId : productCategoryMember.productId, facilityId : productStore.inventoryFacilityId], true);
-            if(productFacility) {
-                if(productFacility.lastInventoryCount >= 1) {
+            product = delegator.findByPrimaryKeyCache("Product", [productId : productCategoryMember.productId]);
+            boolean isMarketingPackage = EntityTypeUtil.hasParentType(delegator, "ProductType", "productTypeId", product.productTypeId, "parentTypeId", "MARKETING_PKG");
+            context.isMarketingPackage = (isMarketingPackage? "true": "false");
+            if (isMarketingPackage) {
+                resultOutput = dispatcher.runSync("getMktgPackagesAvailable", [productId : productCategoryMember.productId]);
+                availableInventory = resultOutput.availableToPromiseTotal;
+                if(availableInventory > 0) {
                     productsInStock.add(productCategoryMember);
                 }
+            } else {
+                facilities = delegator.findList("ProductFacility", EntityCondition.makeCondition([productId : productCategoryMember.productId]), null, null, null, false);
+                availableInventory = 0.0;
+                if (facilities) {
+                    facilities.each { facility ->
+                        lastInventoryCount = facility.lastInventoryCount;
+                        if (lastInventoryCount != null) {
+                            availableInventory += lastInventoryCount;
+                        }
+                    }
+                    if (availableInventory > 0) {
+                        productsInStock.add(productCategoryMember);
+                    }
+                }
             }
         }
         context.productCategoryMembers = productsInStock;

Modified: ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy (original)
+++ ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy Mon Mar 26 20:56:02 2012
@@ -43,14 +43,15 @@ metaKeywords = null;
 // get the product entity
 if (productId) {
     product = delegator.findByPrimaryKeyCache("Product", [productId : productId]);
-
-    // first make sure this isn't a virtual-variant that has an associated virtual product, if it does show that instead of the variant
-    if("Y".equals(product.isVirtual) && "Y".equals(product.isVariant)){
-        virtualVariantProductAssocs = delegator.findByAndCache("ProductAssoc", ["productId": productId, "productAssocTypeId": "ALTERNATIVE_PACKAGE"], ["-fromDate"]);
-        virtualVariantProductAssocs = EntityUtil.filterByDate(virtualVariantProductAssocs);
-        if (virtualVariantProductAssocs) {
-            productAssoc = EntityUtil.getFirst(virtualVariantProductAssocs);
-            product = productAssoc.getRelatedOneCache("AssocProduct");
+    if (product) {
+        // first make sure this isn't a virtual-variant that has an associated virtual product, if it does show that instead of the variant
+        if("Y".equals(product.isVirtual) && "Y".equals(product.isVariant)){
+            virtualVariantProductAssocs = delegator.findByAndCache("ProductAssoc", ["productId": productId, "productAssocTypeId": "ALTERNATIVE_PACKAGE"], ["-fromDate"]);
+            virtualVariantProductAssocs = EntityUtil.filterByDate(virtualVariantProductAssocs);
+            if (virtualVariantProductAssocs) {
+                productAssoc = EntityUtil.getFirst(virtualVariantProductAssocs);
+                product = productAssoc.getRelatedOneCache("AssocProduct");
+            }
         }
     }
     
@@ -124,7 +125,7 @@ if (productId) {
         }
 
         // Set the default template for aggregated product (product component configurator ui)
-        if (product.productTypeId && "AGGREGATED".equals(product.productTypeId) && context.configproductdetailScreen) {
+        if (product.productTypeId && ("AGGREGATED".equals(product.productTypeId) || "AGGREGATED_SERVICE".equals(product.productTypeId)) && context.configproductdetailScreen) {
             detailScreen = context.configproductdetailScreen;
         }
 

Modified: ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductDetail.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductDetail.groovy?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductDetail.groovy (original)
+++ ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductDetail.groovy Mon Mar 26 20:56:02 2012
@@ -662,4 +662,19 @@ if (product) {
     if("ASSET_USAGE".equals(productTypeId) || "ASSET_USAGE_OUT_IN".equals(productTypeId)){
         context.startDate = UtilDateTime.addDaysToTimestamp(UtilDateTime.nowTimestamp(), 1).toString().substring(0,10); // should be tomorrow.
     }
+    
+    // get product tags
+    productKeywords = delegator.findByAnd("ProductKeyword", ["productId": productId, "keywordTypeId" : "KWT_TAG", "statusId" : "KW_APPROVED"]);
+    keywordMap = [:];
+    if (productKeywords) {
+        for (productKeyword in productKeywords) {
+            keywordConds = [EntityCondition.makeCondition("keyword", EntityOperator.EQUALS, productKeyword.keyword),
+                            EntityCondition.makeCondition("keywordTypeId", EntityOperator.EQUALS, "KWT_TAG"),
+                            EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "KW_APPROVED")];
+                keywordCond = EntityCondition.makeCondition(keywordConds, EntityOperator.AND);
+            productKeyWordCount = delegator.findCountByCondition("ProductKeyword", keywordCond, null, null);
+            keywordMap.put(productKeyword.keyword,productKeyWordCount);
+        }
+        context.productTags = keywordMap;
+    }
 }

Modified: ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductSummary.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductSummary.groovy?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductSummary.groovy (original)
+++ ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductSummary.groovy Mon Mar 26 20:56:02 2012
@@ -117,7 +117,7 @@ if (product) {
     }
 
     // get aggregated product totalPrice
-    if ("AGGREGATED".equals(product.productTypeId)) {
+    if ("AGGREGATED".equals(product.productTypeId)||"AGGREGATED_SERVICE".equals(product.productTypeId)) {
         configWrapper = ProductConfigWorker.getProductConfigWrapper(productId, cart.getCurrency(), request);
         if (configWrapper) {
             configWrapper.setDefaultConfig();

Modified: ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy (original)
+++ ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy Mon Mar 26 20:56:02 2012
@@ -113,7 +113,7 @@ if (!partyId) {
     if (fromPartyId) {
         partyId = fromPartyId;
     } else {
-        partyId = UtilProperties.getPropertyValue("general.properties", "ORGANIZATION_PARTY");
+        partyId = EntityUtilProperties.getPropertyValue("general.properties", "ORGANIZATION_PARTY", delegator);
     }
 }
 

Modified: ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/WEB-INF/controller.xml?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/WEB-INF/controller.xml (original)
+++ ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/WEB-INF/controller.xml Mon Mar 26 20:56:02 2012
@@ -1158,7 +1158,7 @@ under the License.
     
     <request-map uri="checkReportBy">
         <security https="true" auth="true"/>
-        <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/" invoke="CheckReportBy.groovy"/>
+        <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/CheckReportBy.groovy"/>
         <response name="dayPDF" type="request" value="SalesReport.pdf"/>
         <response name="weekPDF" type="request" value="SalesReportWeek.pdf"/>
         <response name="monthPDF" type="request" value="SalesReportMonth.pdf"/>
@@ -1174,51 +1174,51 @@ under the License.
         </response>
     </request-map>
     <request-map uri="SalesReport.pdf"><security https="true" auth="true"/>
-        <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/" invoke="SalesReport.groovy"/>
+        <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/SalesReport.groovy"/>
         <response name="success" type="view" value="SalesOrderReportPDF"/>
     </request-map>
     <request-map uri="SalesReportWeek.pdf"><security https="true" auth="true"/>
-        <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/" invoke="SalesReport.groovy"/>
+        <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/SalesReport.groovy"/>
         <response name="success" type="view" value="SalesOrderReportWeekPDF"/>
     </request-map>
     <request-map uri="SalesReportMonth.pdf"><security https="true" auth="true"/>
-        <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/" invoke="SalesReport.groovy"/>
+        <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/SalesReport.groovy"/>
         <response name="success" type="view" value="SalesOrderReportMonthPDF"/>
     </request-map>
     <request-map uri="SalesReport.excel"><security https="true" auth="true"/>
-        <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/" invoke="SalesReport.groovy"/>
+        <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/SalesReport.groovy"/>
         <response name="success" type="view" value="SalesOrderReportExcel"/>
     </request-map>
     <request-map uri="SalesReportWeek.excel"><security https="true" auth="true"/>
-        <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/" invoke="SalesReport.groovy"/>
+        <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/SalesReport.groovy"/>
         <response name="success" type="view" value="SalesOrderReportWeekExcel"/>
     </request-map>
     <request-map uri="SalesReportMonth.excel"><security https="true" auth="true"/>
-        <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/" invoke="SalesReport.groovy"/>
+        <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/SalesReport.groovy"/>
         <response name="success" type="view" value="SalesOrderReportMonthExcel"/>
     </request-map>
     <request-map uri="SalesReport.html"><security https="true" auth="true"/>
-        <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/" invoke="SalesReport.groovy"/>
+        <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/SalesReport.groovy"/>
         <response name="success" type="view" value="SalesOrderReportHTML"/>
     </request-map>
     <request-map uri="SalesReportWeek.html"><security https="true" auth="true"/>
-        <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/" invoke="SalesReport.groovy"/>
+        <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/SalesReport.groovy"/>
         <response name="success" type="view" value="SalesOrderReportWeekHTML"/>
     </request-map>
     <request-map uri="SalesReportMonth.html"><security https="true" auth="true"/>
-        <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/" invoke="SalesReport.groovy"/>
+        <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/SalesReport.groovy"/>
         <response name="success" type="view" value="SalesOrderReportMonthHTML"/>
     </request-map>
     <request-map uri="NetBeforeOverheadReport.pdf"><security https="true" auth="true"/>
-        <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/" invoke="NetBeforeOverheadReport.groovy"/>
+        <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/NetBeforeOverheadReport.groovy"/>
         <response name="success" type="view" value="NetBeforeOverheadOrderReport"/>
     </request-map>
     <request-map uri="ProductDemandReport.pdf"><security https="true" auth="true"/>
-        <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/" invoke="ProductDemandReport.groovy"/>
+        <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/ProductDemandReport.groovy"/>
         <response name="success" type="view" value="ProductDemandOrderReport"/>
     </request-map>
     <request-map uri="ProductContributionReport.pdf"><security https="true" auth="true"/>
-        <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/" invoke="ProductContributionReport.groovy"/>
+        <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/ProductContributionReport.groovy"/>
         <response name="success" type="view" value="ProductDemandOrderReport"/>
     </request-map>
 
@@ -1226,7 +1226,7 @@ under the License.
         <response name="success" type="view" value="OrderByReferrerReport"/>
     </request-map>
     <request-map uri="OrdersByChannel.pdf"><security https="true" auth="true"/>
-        <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/" invoke="OrderByChannel.groovy"/>
+        <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/OrderByChannel.groovy"/>
         <response name="success" type="view" value="OrdersByChannelReport"/>
     </request-map>
     <request-map uri="OrderDiscountCode.pdf">

Modified: ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl (original)
+++ ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl Mon Mar 26 20:56:02 2012
@@ -103,7 +103,7 @@ under the License.
       <div>
         <#if categoryImageUrl?string?has_content>
           <#assign height=100/>
-          <img src='<@ofbizContentUrl>${categoryImageUrl}</@ofbizContentUrl>' vspace='5' hspace='5' border='1' height='${height}' align='left' alt="" />
+          <img src='<@ofbizContentUrl>${categoryImageUrl}</@ofbizContentUrl>' vspace='5' hspace='5' align='left' class='cssImgLarge' />
         </#if>
         <#if longDescription?has_content>
           ${longDescription}

Modified: ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/entry/catalog/compareproducts.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/entry/catalog/compareproducts.ftl?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/entry/catalog/compareproducts.ftl (original)
+++ ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/entry/catalog/compareproducts.ftl Mon Mar 26 20:56:02 2012
@@ -59,7 +59,7 @@ under the License.
     <#elseif product.productTypeId?if_exists == "ASSET_USAGE_OUT_IN"/>
                 <a href="javascript:doGetViaParent('${productUrl}');" class="buttontext">${uiLabelMap.OrderRent}...</a>
     <#-- check to see if it is an aggregated or configurable product; will enter parameters on the detail screen-->
-    <#elseif product.productTypeId?if_exists == "AGGREGATED"/>
+    <#elseif product.productTypeId?if_exists == "AGGREGATED" || product.productTypeId?if_exists == "AGGREGATED_SERVICE"/>
                 <a href="javascript:doGetViaParent('${productUrl}');" class="buttontext">${uiLabelMap.OrderConfigure}...</a>
     <#-- check to see if the product is a virtual product -->
     <#elseif product.isVirtual?exists && product.isVirtual == "Y"/>
@@ -163,7 +163,7 @@ under the License.
     <#elseif product.productTypeId?if_exists == "ASSET_USAGE_OUT_IN"/>
                 <a href="javascript:doGetViaParent('${productUrl}');" class="buttontext">${uiLabelMap.OrderRent}...</a>
     <#-- check to see if it is an aggregated or configurable product; will enter parameters on the detail screen-->
-    <#elseif product.productTypeId?if_exists == "AGGREGATED"/>
+    <#elseif product.productTypeId?if_exists == "AGGREGATED" || product.productTypeId?if_exists == "AGGREGATED_SERVICE"/>
                 <a href="javascript:doGetViaParent('${productUrl}');" class="buttontext">${uiLabelMap.OrderConfigure}...</a>
     <#-- check to see if the product is a virtual product -->
     <#elseif product.isVirtual?exists && product.isVirtual == "Y"/>

Modified: ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/entry/catalog/configproductdetail.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/entry/catalog/configproductdetail.ftl?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/entry/catalog/configproductdetail.ftl (original)
+++ ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/entry/catalog/configproductdetail.ftl Mon Mar 26 20:56:02 2012
@@ -199,7 +199,7 @@ function getConfigDetails() {
         <#assign productLargeImageUrl = firstLargeImage>
       </#if>
       <#if productLargeImageUrl?string?has_content>
-        <a href="javascript:popupDetail();"><img src='<@ofbizContentUrl>${contentPathPrefix?if_exists}${productLargeImageUrl?if_exists}</@ofbizContentUrl>' name='mainImage' vspace='5' hspace='5' border='0' width='200' align='left' alt="" /></a>
+        <a href="javascript:popupDetail();"><img src='<@ofbizContentUrl>${contentPathPrefix?if_exists}${productLargeImageUrl?if_exists}</@ofbizContentUrl>' name='mainImage' vspace='5' hspace='5' class='cssImgLarge' align='left' alt="" /></a>
       </#if>
     </td>
     <td align="right" valign="top">
@@ -402,7 +402,7 @@ function getConfigDetails() {
                   <#assign imageUrl = "/images/defaultImage.jpg">
                 </#if>
                 <td align="center" valign="bottom">
-                  <a href="javascript:getList('FT${featureOrderFirst}','${indexer}',1);"><img src="<@ofbizContentUrl>${contentPathPrefix?if_exists}${imageUrl}</@ofbizContentUrl>" border="0" width="60" height="60" alt="" /></a>
+                  <a href="javascript:getList('FT${featureOrderFirst}','${indexer}',1);"><img src="<@ofbizContentUrl>${contentPathPrefix?if_exists}${imageUrl}</@ofbizContentUrl>" class='cssImgStandard' alt="" /></a>
                   <br />
                   <a href="javascript:getList('FT${featureOrderFirst}','${indexer}',1);" class="buttontext">${key}</a>
                 </td>
@@ -463,7 +463,7 @@ function getConfigDetails() {
                 </#if>
                 <#assign image = question.content.get("IMAGE_URL")?if_exists>
                 <#if image?has_content>
-                  <img src='<@ofbizContentUrl>${contentPathPrefix?if_exists}${image?if_exists}</@ofbizContentUrl>' vspace='5' hspace='5' border='0' width='200' align='left' alt="" />
+                  <img src='<@ofbizContentUrl>${contentPathPrefix?if_exists}${image?if_exists}</@ofbizContentUrl>' vspace='5' hspace='5' class='cssImgSmall' align='left' alt="" />
                 </#if>
               <#else>
                 <div><a href='#${question.getConfigItem().getString("configItemId")}' class="buttontext">Details</a></div>

Modified: ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/entry/catalog/inlineProductDetail.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/entry/catalog/inlineProductDetail.ftl?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/entry/catalog/inlineProductDetail.ftl (original)
+++ ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/entry/catalog/inlineProductDetail.ftl Mon Mar 26 20:56:02 2012
@@ -264,7 +264,7 @@ ${virtualJavaScript?if_exists}
       </#if>
       <#if productLargeImageUrl?string?has_content>
         <input type="hidden" name="detailImage${inlineCounter}" value="${firstDetailImage?default(mainDetailImageUrl?default("_NONE_"))}"/>
-        <a href="javascript:popupDetailInline('${inlineCounter}');"><img src='<@ofbizContentUrl>${contentPathPrefix?if_exists}${productLargeImageUrl?if_exists}</@ofbizContentUrl>' name='mainImage${inlineCounter}' vspace='5' hspace='5' border='0' width='100' align='left' alt="" /></a>
+        <a href="javascript:popupDetailInline('${inlineCounter}');"><img src='<@ofbizContentUrl>${contentPathPrefix?if_exists}${productLargeImageUrl?if_exists}</@ofbizContentUrl>' name='mainImage${inlineCounter}' vspace='5' hspace='5' class='cssImgLarge' align='left' alt="" /></a>
       </#if>
     </td>
     <td align="right" valign="top" width="100%">

Modified: ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl (original)
+++ ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl Mon Mar 26 20:56:02 2012
@@ -310,7 +310,7 @@ ${virtualJavaScript?if_exists}
         <#assign productLargeImageUrl = firstLargeImage>
       </#if>
       <#if productLargeImageUrl?string?has_content>
-        <a href="javascript:popupDetail();"><img src="<@ofbizContentUrl>${contentPathPrefix?if_exists}${productLargeImageUrl?if_exists}</@ofbizContentUrl>" name="mainImage" vspace="5" hspace="5" border="0" width="200" alt="" /></a>
+        <a href="javascript:popupDetail();"><img src="<@ofbizContentUrl>${contentPathPrefix?if_exists}${productLargeImageUrl?if_exists}</@ofbizContentUrl>" name="mainImage" vspace="5" hspace="5" class='cssImgLarge' alt="" /></a>
       </#if>
     </td>
     <td align="right" valign="top">
@@ -604,7 +604,7 @@ ${virtualJavaScript?if_exists}
                   <#assign imageUrl = "/images/defaultImage.jpg">
                 </#if>
                 <td align="center" valign="bottom">
-                  <a href="javascript:getList('FT${featureOrderFirst}','${indexer}',1);"><img src="<@ofbizContentUrl>${contentPathPrefix?if_exists}${imageUrl}</@ofbizContentUrl>" border="0" width="60" height="60" alt="" /></a>
+                  <a href="javascript:getList('FT${featureOrderFirst}','${indexer}',1);"><img src="<@ofbizContentUrl>${contentPathPrefix?if_exists}${imageUrl}</@ofbizContentUrl>" class='cssImgSmall' alt="" /></a>
                   <br />
                   <a href="javascript:getList('FT${featureOrderFirst}','${indexer}',1);" class="linktext">${key}</a>
                 </td>