You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ap...@apache.org on 2007/07/23 11:04:33 UTC

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

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



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

Posted by David E Jones <jo...@hotwaxmedia.com>.
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: apatel@apache.org <ap...@apache.org>
> Date: Jul 23, 2007 2:04 AM
> Subject: svn commit: r558668 -
> /ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java 
> 
> To: commits@ofbiz.apache.org
> 
> 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)) {
> 

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

Posted by Anil Patel <ap...@adititechlabs.com>.
Si, David,
FYI: This is other commit I did earlier that has similar modification.

Regards
Anil Patel

---------- Forwarded message ----------
From: apatel@apache.org <ap...@apache.org>
Date: Jul 23, 2007 2:04 AM
Subject: svn commit: r558668 -
/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java
To: commits@ofbiz.apache.org

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