public class BroadleafCheckoutController extends AbstractCheckoutController
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
baseConfirmationView |
protected static java.lang.String |
cartPageRedirect |
protected static java.lang.String |
checkoutPageRedirect |
protected static java.lang.String |
checkoutView |
protected static java.lang.String |
multishipAddAddressSuccessView |
protected static java.lang.String |
multishipAddAddressView |
protected static java.lang.String |
multishipSuccessView |
protected static java.lang.String |
multishipView |
addressService, billingInfoFormValidator, checkoutService, countryService, creditCardPaymentInfoFactory, customerAddressService, customerService, fulfillmentGroupService, fulfillmentOptionService, fulfillmentPricingService, multishipAddAddressFormValidator, orderInfoFormValidator, orderMultishipOptionService, orderService, paymentInfoTypeService, securePaymentInfoService, shippingInfoFormValidator, stateService| Constructor and Description |
|---|
BroadleafCheckoutController() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.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.
|
java.lang.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
If the paymentMethod is undefined or "creditCard" delegates to the "completeSecureCreditCardCheckout"
method.
|
java.lang.String |
completeSecureCreditCardCheckout(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 using a Credit Card
This method assumes that a credit card payment info
will be either sent to a third party gateway or saved in a secure schema.
|
java.lang.String |
convertToSingleship(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model)
Converts the order to singleship by collapsing all of the fulfillment groups into the
default one
|
protected void |
copyShippingAddressToBillingAddress(Order order,
BillingInfoForm billingInfoForm)
This method will copy the shipping address of the first fulfillment group on the order
to the billing address on the BillingInfoForm that is passed in.
|
java.lang.String |
getBaseConfirmationView() |
java.lang.String |
getCartPageRedirect() |
java.lang.String |
getCheckoutPageRedirect() |
java.lang.String |
getCheckoutView() |
protected java.lang.String |
getConfirmationView(java.lang.String orderNumber) |
java.lang.String |
getMultishipAddAddressSuccessView() |
java.lang.String |
getMultishipAddAddressView() |
java.lang.String |
getMultishipSuccessView() |
java.lang.String |
getMultishipView() |
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 java.util.List<java.lang.String> |
populateExpirationMonths()
A helper method used to construct a list of Credit Card Expiration Months
Useful for expiration dropdown menus.
|
protected java.util.List<java.lang.String> |
populateExpirationYears()
A helper method used to construct a list of Credit Card Expiration Years
Useful for expiration dropdown menus.
|
protected void |
populateModelWithShippingReferenceData(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
|
java.lang.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
|
java.lang.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.
|
java.lang.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.
|
java.lang.String |
saveMultiShipInstruction(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
MultiShipInstructionForm instructionForm) |
java.lang.String |
savePaymentForm(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model) |
java.lang.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
Note that the default Broadleaf implementation creates an order
with a single fulfillment group.
|
java.lang.String |
showMultiship(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model)
Renders the multiship page.
|
java.lang.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
|
getContextPath, isAjaxRequestprotected static java.lang.String cartPageRedirect
protected static java.lang.String checkoutView
protected static java.lang.String checkoutPageRedirect
protected static java.lang.String multishipView
protected static java.lang.String multishipAddAddressView
protected static java.lang.String multishipAddAddressSuccessView
protected static java.lang.String multishipSuccessView
protected static java.lang.String baseConfirmationView
public java.lang.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 java.lang.String convertToSingleship(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model)
throws PricingException
request - response - model - PricingExceptionpublic java.lang.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 java.lang.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 java.lang.String savePaymentForm(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model)
throws PricingException
PricingExceptionpublic java.lang.String showMultiship(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model)
request - response - model - public java.lang.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 java.lang.String showMultishipAddAddress(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model)
request - response - model - public java.lang.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 java.lang.String saveMultiShipInstruction(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
MultiShipInstructionForm instructionForm)
throws ServiceException,
PricingException
ServiceExceptionPricingExceptionpublic java.lang.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 - ServiceExceptionCheckoutExceptionPricingExceptionpublic java.lang.String completeSecureCreditCardCheckout(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 void copyShippingAddressToBillingAddress(Order order, BillingInfoForm billingInfoForm)
billingInfoForm - protected boolean hasValidShippingAddresses(Order cart)
cart - protected boolean hasValidOrderInfo(Order cart)
cart - protected void putFulfillmentOptionsAndEstimationOnModel(org.springframework.ui.Model model)
protected java.util.List<java.lang.String> populateExpirationMonths()
protected java.util.List<java.lang.String> populateExpirationYears()
protected void initBinder(javax.servlet.http.HttpServletRequest request,
org.springframework.web.bind.ServletRequestDataBinder binder)
throws java.lang.Exception
request - binder - java.lang.Exceptionprotected void populateModelWithShippingReferenceData(javax.servlet.http.HttpServletRequest request,
org.springframework.ui.Model model)
public java.lang.String getCartPageRedirect()
public java.lang.String getCheckoutView()
public java.lang.String getCheckoutPageRedirect()
public java.lang.String getMultishipView()
public java.lang.String getMultishipAddAddressView()
public java.lang.String getMultishipSuccessView()
public java.lang.String getMultishipAddAddressSuccessView()
public java.lang.String getBaseConfirmationView()
protected java.lang.String getConfirmationView(java.lang.String orderNumber)
Copyright © 2018. All Rights Reserved.