public class BroadleafCartController extends AbstractCartController
| Modifier and Type | Field and Description |
|---|---|
protected static String |
cartPageRedirect |
protected static String |
cartView |
catalogService, offerService, orderService, updateCartService| Constructor and Description |
|---|
BroadleafCartController() |
| Modifier and Type | Method and Description |
|---|---|
String |
add(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
AddToCartItem itemRequest)
Takes in an item request, adds the item to the customer's current cart, and returns.
|
String |
addPromo(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
String customerOffer)
Attempts to add provided Offer to Cart
|
String |
addWithPriceOverride(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
AddToCartItem itemRequest)
Takes in an item request, adds the item to the customer's current cart, and returns.
|
String |
cart(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model)
Renders the cart page.
|
String |
empty(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model)
Cancels the current cart and redirects to the homepage
|
String |
getCartPageRedirect() |
String |
getCartView() |
String |
remove(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
AddToCartItem itemRequest)
Takes in an item request, updates the quantity of that item in the cart, and returns
If the method was invoked via an AJAX call, it will render the "ajax/cart" template.
|
String |
removePromo(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Long offerCodeId)
Removes offer from cart
|
String |
updateQuantity(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
AddToCartItem itemRequest)
Takes in an item request and updates the quantity of that item in the cart.
|
getContextPath, isAjaxRequestprotected static String cartView
protected static String cartPageRedirect
public String cart(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model) throws PricingException
request - response - model - PricingExceptionpublic String add(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, AddToCartItem itemRequest) throws IOException, AddToCartException, PricingException
request - response - model - itemRequest - IOExceptionAddToCartExceptionPricingExceptionpublic String addWithPriceOverride(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, AddToCartItem itemRequest) throws IOException, AddToCartException, PricingException
request - response - model - itemRequest - IOExceptionAddToCartExceptionPricingExceptionpublic String updateQuantity(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, AddToCartItem itemRequest) throws IOException, UpdateCartException, PricingException, RemoveFromCartException
request - response - model - itemRequest - IOExceptionPricingExceptionUpdateCartExceptionRemoveFromCartExceptionpublic String remove(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, AddToCartItem itemRequest) throws IOException, PricingException, RemoveFromCartException
request - response - model - itemRequest - IOExceptionPricingExceptionRemoveFromCartExceptionpublic String empty(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model) throws PricingException
request - response - model - PricingExceptionpublic String addPromo(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, String customerOffer) throws IOException, PricingException
request - response - model - customerOffer - IOExceptionPricingExceptionItemNotFoundExceptionOfferMaxUseExceededExceptionpublic String removePromo(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, Long offerCodeId) throws IOException, PricingException
request - response - model - IOExceptionPricingExceptionItemNotFoundExceptionOfferMaxUseExceededExceptionpublic String getCartView()
public String getCartPageRedirect()
Copyright © 2013. All Rights Reserved.