public static String determineInitialCheckOutPage(ShoppingCart cart){
  String page=DEFAULT_INIT_CHECKOUT_PAGE;
  if (cart == null)   return page;
  if (!cart.shippingApplies()) {
    cart.setAllShipmentMethodTypeId("NO_SHIPPING");
    cart.setAllCarrierPartyId("_NA_");
    page="payment";
  }
  return page;
}

public static String determineInitialCheckOutPage ( ShoppingCart cart ) { String page = DEFAULT_INIT_CHECKOUT_PAGE ; if ( cart == null ) return page ; if ( ! cart . shippingApplies ( ) ) { cart . setAllShipmentMethodTypeId ( "NO_SHIPPING" ) ; cart . setAllCarrierPartyId ( "_NA_" ) ; page = "payment" ; } return page ; }
method to determine the initial checkout page based on requirements . this will also set any cart variables necessary to satisfy the requirements , such as setting the shipment method according to the type of items in the cart .
