Author: sichen Date: Thu Feb 15 14:54:41 2007 New Revision: 508223 URL: http://svn.apache.org/viewvc?view=rev&rev=508223 Log: fixed a bug. now if you don't enter product id during order entry, it'll return an error message
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java?view=diff&rev=508223&r1=508222&r2=508223 ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java Thu Feb 15 14:54:41 2007 @@ -175,7 +175,7 @@ itemType = (String) paramMap.remove("add_item_type"); } - if (productId == null) { + if (UtilValidate.isEmpty(productId)) { // before returning error; check make sure we aren't adding a special item type if (UtilValidate.isEmpty(itemType)) { request.setAttribute("_ERROR_MESSAGE_", UtilProperties.getMessage(resource, "cart.addToCart.noProductInfoPassed", locale));