svn commit: r558668 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java

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

svn commit: r558668 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java

apatel-2
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)) {