I think this one is fine, or I can't see anything wrong with it.

-David


Anil Patel wrote:
Si, David,
FYI: This is other commit I did earlier that has similar modification.

Regards
Anil Patel

---------- Forwarded message ----------
From: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Jul 23, 2007 2:04 AM
Subject: svn commit: r558668 -
/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java
To: [EMAIL PROTECTED]

Author: apatel
Date: Mon Jul 23 02:04:33 2007
New Revision: 558668

URL: http://svn.apache.org/viewvc?view=rev&rev=558668
Log:
if shipmentMethodType is not set and getShipEstimate is called, an error is
returned, I think If shipmentMethodType is not set, its not error condition.
So now if shipmentMethodType is not set and getShipEstimate is called, ship
estimate will not be set estimate in cart but no error will be returned.

Modified:
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java

Modified:
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java?view=diff&rev=558668&r1=558667&r2=558668 ==============================================================================
---
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java
(original)
+++
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java
Mon Jul 23 02:04:33 2007
@@ -53,6 +53,10 @@

        int shipGroups = cart.getShipGroupSize();
        for (int i = 0; i < shipGroups; i++) {
+            String shipmentMethodTypeId = cart.getShipmentMethodTypeId(i);
+            if(UtilValidate.isEmpty(shipmentMethodTypeId)){
+                continue;
+            }
            Map result = getShipGroupEstimate(dispatcher, delegator, cart,
i);
            ServiceUtil.getMessages(request, result, null, "", "", "", "",
null, null);
            if (result.get(ModelService.RESPONSE_MESSAGE).equals(
ModelService.RESPOND_ERROR)) {

Reply via email to