Fwd: 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
2 messages Options
Reply | Threaded
Open this post in threaded view
|

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

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

Regards
Anil Patel

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

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 | Threaded
Open this post in threaded view
|

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

David E Jones

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: [hidden email] <[hidden email]>
> Date: Jul 23, 2007 2:04 AM
> Subject: svn commit: r558668 -
> /ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java
>
> To: [hidden email]
>
> 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)) {
>