public static String checkCart(HttpServletRequest request,HttpServletResponse response){
  ShoppingCart cart=getCartObject(request);
  if (cart == null || cart.size() <= 0) {
    return "cartEmpty";
  }
  return "success";
}

public static String checkCart ( HttpServletRequest request , HttpServletResponse response ) { ShoppingCart cart = getCartObject ( request ) ; if ( cart == null || cart . size ( ) <= 0 ) { return "cartEmpty" ; } return "success" ; }
scipio : checks if cart empty and valid . if missing or empty , returns cartempty . if broken some other way , returns " error " . otherwise , returns " success " . < p > helps with template compatibility . < p > note : there is a org . ofbiz . order . shoppingcart . checkoutevents . cartnotempty , but it returns error when cart empty .
