Class BroadleafShippingInfoController


public class BroadleafShippingInfoController extends AbstractCheckoutController
In charge of performing the various checkout operations
Author:
Andre Azzolini (apazzolini), Elbert Bautista (elbertbautista), Joshua Skorton (jskorton)
  • Field Details

    • multishipView

      protected static String multishipView
    • multishipAddAddressView

      protected static String multishipAddAddressView
    • multishipAddAddressSuccessView

      protected static String multishipAddAddressSuccessView
    • multishipSuccessView

      protected static String multishipSuccessView
  • Constructor Details

    • BroadleafShippingInfoController

      public BroadleafShippingInfoController()
  • Method Details

    • getMultishipView

      public String getMultishipView()
    • getMultishipAddAddressView

      public String getMultishipAddAddressView()
    • getMultishipSuccessView

      public String getMultishipSuccessView()
    • getMultishipAddAddressSuccessView

      public String getMultishipAddAddressSuccessView()
    • convertToSingleship

      public String convertToSingleship(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model) throws PricingException
      Converts the order to single ship by collapsing all of the shippable fulfillment groups into the default (first) shippable fulfillment group. Allows modules to add module specific shipping logic.
      Parameters:
      request -
      response -
      model -
      Returns:
      a redirect to /checkout
      Throws:
      PricingException
    • saveSingleShip

      public String saveSingleShip(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, ShippingInfoForm shippingForm, org.springframework.validation.BindingResult result) throws PricingException, ServiceException
      Processes the request to save a single shipping address. Allows modules to add module specific shipping logic.

      Note: the default Broadleaf implementation creates an order with a single fulfillment group. In the case of shipping to multiple addresses, the multiship methods should be used.

      Parameters:
      request -
      response -
      model -
      shippingForm -
      Returns:
      the return path
      Throws:
      ServiceException
      PricingException
    • copyBillingAddressToShippingAddress

      protected void copyBillingAddressToShippingAddress(Order order, ShippingInfoForm shippingInfoForm)
      This method will copy the billing address of any CREDIT CARD order payment on the order to the shipping address on the ShippingInfoForm that is passed in.
    • showMultiship

      public String showMultiship(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model)
      Renders the multiship page. This page is used by the user when shipping items to different locations (or with different FulfillmentOptions) is desired.

      Note that the default Broadleaf implementation will require the user to input an Address and FulfillmentOption for each quantity of each DiscreteOrderItem.

      Parameters:
      request -
      response -
      model -
      Returns:
      the return path
    • saveMultiship

      public String saveMultiship(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, OrderMultishipOptionForm orderMultishipOptionForm, org.springframework.validation.BindingResult result) throws PricingException, ServiceException
      Processes the given options for multiship. Validates that all options are selected before performing any actions. Allows modules to add module specific shipping logic.
      Parameters:
      request -
      response -
      model -
      orderMultishipOptionForm -
      Returns:
      a redirect to the checkout page
      Throws:
      PricingException
      ServiceException
      See Also:
    • showMultishipAddAddress

      public String showMultishipAddAddress(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model)
      Renders the add address form during the multiship process
      Parameters:
      request -
      response -
      model -
      Returns:
      the return path
    • saveMultishipAddAddress

      public String saveMultishipAddAddress(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, ShippingInfoForm addressForm, org.springframework.validation.BindingResult result) throws ServiceException
      Processes the requested add address from the multiship process. This method will create a CustomerAddress based on the requested Address and associate it with the current Customer in session.
      Parameters:
      request -
      response -
      model -
      addressForm -
      Returns:
      the return path to the multiship page
      Throws:
      ServiceException
    • saveMultiShipInstruction

      public String saveMultiShipInstruction(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, MultiShipInstructionForm instructionForm) throws ServiceException, PricingException
      Throws:
      ServiceException
      PricingException
    • removeUnusedPhones

      public void removeUnusedPhones(ShippingInfoForm form)