Setting Up a New Form

Learn how to create a new form in the dynamic multistep checkout.

Context

Products inherit the form from the assigned Categories. To have more forms displayed, assign the Form-Categories onto the same product or different products.

Having One or Multiple Forms per Checkout Page

You can have a checkout page with one or multiple forms.

Procedure

  1. Define a formPageId - a unique identifier is obtained by the objects used to differentiate pages.

    For example, if there is a PolicyBundleSet per page, then the ID of the PolicyBundle object can be used. In case a PolicyBundle is split into multiple pages, then there must be a segmenting object for the PolicyBundle object to be used as a unique item for the page.

    For example, the cartData conversion into a list of formPageIds: DefaultInsuranceCheckoutFormsStrategy.getFormPageIdList(final CartData cartData). The InsurnaceCheckoutHelper is the one to convert formPageId to the OrderEntryData.

  2. The FormObjects list is displayed on one checkout page - strategic function is implemented or extended and the desired number of the forms to display per page is returned.
  3. The formPageId map - the progressBarId is defined and used to identify which progress bar is displayed active on the checkout pages.

    DefaultInsuranceCheckoutFormsStrategy.getFormPageIdList(final CartData cartData)

  4. Set up the label in the properties file.

Setting Up a New None-Form Checkout Page

You can set up a checkout page to contain a none-form.

Procedure

  1. Navigate to <HYBRIS_BIN_DIR>\modules\financial-services-accelerator\financialacceleratorstorefront\resources\financialacceleratorstorefron\web\spring\financialacceleratorstorefront-web-spring.xml file to create a new checkoutStep.
  2. Inject the newly created checkoutStep to the page flow of the checkout pages. Change the previous and next entry key for itself, and previous, and proceeding checkoutSteps.
  3. Assign the new checkoutStep to the defaultCheckoutGroup.
  4. Make sure the Controller is extending the AbstractInsuranceCheckoutStepController.
  5. Create a view page for this new checkout page and link it to the controller.