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, 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 |
|---|---|
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.
|
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.
|
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.
|
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.
|
String |
getBaseConfirmationView() |
String |
getCartPageRedirect() |
String |
getCheckoutPageRedirect() |
String |
getCheckoutView() |
protected String |
getConfirmationView(String orderNumber) |
String |
getMultishipAddAddressSuccessView() |
String |
getMultishipAddAddressView() |
String |
getMultishipSuccessView() |
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 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 |
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
|
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
Note that the default Broadleaf implementation creates an order
with a single fulfillment group.
|
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
|
getContextPath, isAjaxRequestprotected 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 - ServiceExceptionCheckoutExceptionPricingExceptionpublic 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 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 populateModelWithShippingReferenceData(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 © 2013. All Rights Reserved.