svn commit: r735886 - in /ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart: CheckOutEvents.java product/ProductDisplayWorker.java

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

svn commit: r735886 - in /ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart: CheckOutEvents.java product/ProductDisplayWorker.java

bibryam
Author: bibryam
Date: Mon Jan 19 16:20:11 2009
New Revision: 735886

URL: http://svn.apache.org/viewvc?rev=735886&view=rev
Log:
Fixed empty shopping cart checks.

Modified:
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java?rev=735886&r1=735885&r2=735886&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java Mon Jan 19 16:20:11 2009
@@ -61,7 +61,7 @@
         //Locale locale = UtilHttp.getLocale(request);
         String errMsg = null;
 
-        if (UtilValidate.isNotEmpty(cart)) {
+        if (cart != null && cart.size() > 0) {
             return "success";
         } else {
             errMsg = UtilProperties.getMessage(resource_error, "checkevents.cart_empty", (cart != null ? cart.getLocale() : Locale.getDefault()));

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java?rev=735886&r1=735885&r2=735886&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java Mon Jan 19 16:20:11 2009
@@ -233,7 +233,7 @@
 
             // remove all products that are already in the cart
             ShoppingCart cart = (ShoppingCart) httpRequest.getSession().getAttribute("shoppingCart");
-            if (UtilValidate.isNotEmpty(cart)) {
+            if (cart != null && cart.size() > 0) {
                 Iterator cartiter = cart.iterator();
                 while (cartiter.hasNext()) {
                     ShoppingCartItem item = (ShoppingCartItem) cartiter.next();