public class BroadleafCheckoutController extends AbstractCheckoutController
| Modifier and Type | Field and Description |
|---|---|
protected static String |
baseConfirmationView |
protected static String |
cartPageRedirect |
protected static String |
checkoutPageRedirect |
protected static String |
checkoutView |
protected static String |
multishipAddAddressSuccessView |
protected static String |
multishipAddAddressView |
protected static String |
multishipSuccessView |
protected static String |
multishipView |
addressService, checkoutControllerExtensionManager, checkoutService, countryService, customerAddressService, customerService, fulfillmentGroupService, fulfillmentOptionService, fulfillmentPricingService, multishipAddAddressFormValidator, orderInfoFormValidator, orderMultishipOptionService, orderService, paymentInfoServiceExtensionManager, paymentInfoTypeService, shippingInfoFormValidator, stateService| Constructor and Description |
|---|
BroadleafCheckoutController() |
| Modifier and Type | Method and Description |
|---|---|
String |
checkout(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)
Renders the default checkout page and allows modules to add variables to the model.
|
String |
completeCheckout(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
BillingInfoForm billingForm,
org.springframework.validation.BindingResult result)
Processes the request to complete checkout.
|
String |
convertToSingleship(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model)
Converts the order to single ship by collapsing all of the shippable fulfillment groups into the default (first)
shippable fulfillment group.
|
protected List<PaymentInfoType> |
createPaymentInfoTypeList(BillingInfoForm billingForm)
A help method that creates a list of PaymentInfos based on payment method in the billingInfoForm.
|
String |
getBaseConfirmationView() |
String |
getCartPageRedirect() |
String |
getCheckoutPageRedirect() |
String |
getCheckoutView() |
protected String |
getConfirmationView(String orderNumber) |
String |
getMultishipAddAddressSuccessView() |
String |
getMultishipAddAddressView() |
String |
getMultishipSuccessView() |
String |
getMultishipView() |
protected String |
handleCheckoutError(javax.servlet.http.HttpServletRequest request,
org.springframework.ui.Model model)
A helper method used to handle checkout errors.
|
protected boolean |
hasValidOrderInfo(Order cart)
A helper method used to determine the validity of order info
|
protected boolean |
hasValidShippingAddresses(Order cart)
A helper method used to determine the validity of the fulfillment groups
|
protected void |
initBinder(javax.servlet.http.HttpServletRequest request,
org.springframework.web.bind.ServletRequestDataBinder binder)
Initializes some custom binding operations for the checkout flow.
|
protected List<String> |
populateExpirationMonths()
A helper method used to construct a list of Credit Card Expiration Months
Useful for expiration dropdown menus.
|
protected List<String> |
populateExpirationYears()
A helper method used to construct a list of Credit Card Expiration Years
Useful for expiration dropdown menus.
|
protected void |
populateModelWithReferenceData(javax.servlet.http.HttpServletRequest request,
org.springframework.ui.Model model) |
protected void |
putFulfillmentOptionsAndEstimationOnModel(org.springframework.ui.Model model)
A helper method to retrieve all fulfillment options for the cart and estimate the cost of applying
fulfillment options on the first shippable fulfillment group.
|
String |
saveGlobalOrderDetails(javax.servlet.http.HttpServletRequest request,
org.springframework.ui.Model model,
OrderInfoForm orderInfoForm,
org.springframework.validation.BindingResult result)
Attempts to attach the user's email to the order so that they may proceed anonymously
|
String |
saveMultiship(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
OrderMultishipOptionForm orderMultishipOptionForm,
org.springframework.validation.BindingResult result)
Processes the given options for multiship.
|
String |
saveMultishipAddAddress(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
ShippingInfoForm addressForm,
org.springframework.validation.BindingResult result)
Processes the requested add address from the multiship process.
|
String |
saveMultiShipInstruction(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
MultiShipInstructionForm instructionForm) |
String |
savePaymentForm(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model) |
String |
saveSingleShip(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
ShippingInfoForm shippingForm,
org.springframework.validation.BindingResult result)
Processes the request to save a single shipping address.
|
String |
showMultiship(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model)
Renders the multiship page.
|
String |
showMultishipAddAddress(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model)
Renders the add address form during the multiship process
|
addDeepLink, getContextPath, isAjaxRequest, jsonResponseprotected static String cartPageRedirect
protected static String checkoutView
protected static String checkoutPageRedirect
protected static String multishipView
protected static String multishipAddAddressView
protected static String multishipAddAddressSuccessView
protected static String multishipSuccessView
protected static String baseConfirmationView
public String checkout(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)
request - response - model - public String convertToSingleship(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model) throws PricingException
request - response - model - PricingExceptionpublic String saveGlobalOrderDetails(javax.servlet.http.HttpServletRequest request, org.springframework.ui.Model model, OrderInfoForm orderInfoForm, org.springframework.validation.BindingResult result) throws ServiceException
request - model - errors - emailAddress - ServiceExceptionpublic String saveSingleShip(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, ShippingInfoForm shippingForm, org.springframework.validation.BindingResult result) throws PricingException, ServiceException
request - response - model - shippingForm - ServiceExceptionPricingExceptionpublic String savePaymentForm(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model) throws PricingException
PricingExceptionpublic String showMultiship(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model)
request - response - model - public String saveMultiship(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, OrderMultishipOptionForm orderMultishipOptionForm, org.springframework.validation.BindingResult result) throws PricingException, ServiceException
request - response - model - orderMultishipOptionForm - PricingExceptionServiceExceptionshowMultiship(HttpServletRequest, HttpServletResponse, Model)public String showMultishipAddAddress(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model)
request - response - model - public String saveMultishipAddAddress(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, ShippingInfoForm addressForm, org.springframework.validation.BindingResult result) throws ServiceException
request - response - model - addressForm - ServiceExceptionpublic String saveMultiShipInstruction(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, MultiShipInstructionForm instructionForm) throws ServiceException, PricingException
ServiceExceptionPricingExceptionpublic String completeCheckout(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, BillingInfoForm billingForm, org.springframework.validation.BindingResult result) throws CheckoutException, PricingException, ServiceException
request - response - model - billingForm - ServiceExceptionCheckoutExceptionPricingExceptionprotected String handleCheckoutError(javax.servlet.http.HttpServletRequest request, org.springframework.ui.Model model)
request - model - protected List<PaymentInfoType> createPaymentInfoTypeList(BillingInfoForm billingForm)
billingForm - protected boolean hasValidShippingAddresses(Order cart)
cart - protected boolean hasValidOrderInfo(Order cart)
cart - protected void putFulfillmentOptionsAndEstimationOnModel(org.springframework.ui.Model model)
protected List<String> populateExpirationMonths()
protected List<String> populateExpirationYears()
protected void initBinder(javax.servlet.http.HttpServletRequest request,
org.springframework.web.bind.ServletRequestDataBinder binder)
throws Exception
request - binder - Exceptionprotected void populateModelWithReferenceData(javax.servlet.http.HttpServletRequest request,
org.springframework.ui.Model model)
public String getCartPageRedirect()
public String getCheckoutView()
public String getCheckoutPageRedirect()
public String getMultishipView()
public String getMultishipAddAddressView()
public String getMultishipSuccessView()
public String getMultishipAddAddressSuccessView()
public String getBaseConfirmationView()
Copyright © 2014. All Rights Reserved.