Class CartPageController
java.lang.Object
de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractPageController
de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractCartPageController
de.hybris.platform.yacceleratorstorefront.controllers.pages.CartPageController
@Controller
@RequestMapping("/cart")
public class CartPageController
extends AbstractCartPageController
Controller for cart page
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
AbstractController.HttpNotFoundException -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractPageController
CMS_PAGE_MODEL, CMS_PAGE_TITLE, PAGE_ROOT, REDIRECT_TO_LOGIN_FOR_CHECKOUT, REDIRECT_TO_MULTISTEP_CHECKOUT, REGISTRATION_CONSENT_ID, UTF_8Fields inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
FORWARD_PREFIX, REDIRECT_PREFIX, ROOT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddFlashMessage(UpdateQuantityForm form, javax.servlet.http.HttpServletRequest request, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel, CartModificationData cartModification) applyVoucherAction(@Valid VoucherForm form, org.springframework.validation.BindingResult bindingResult, javax.servlet.http.HttpServletRequest request, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) cartCheck(org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel) Handle the '/cart/checkout' request url.executeCartEntryAction(String actionCode, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel, Long[] entryNumbers) exportCsvFile(javax.servlet.http.HttpServletResponse response, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel) protected Stringprotected OrderEntryDatagetOrderEntryData(long quantity, String productCode, Integer entryNumber) getProductVariantMatrix(String productCode, String readOnly, org.springframework.ui.Model model) initCheck(org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel, String flow, String pci) booleanprotected StringprepareCartUrl(org.springframework.ui.Model model) protected voidprepareDataForPage(org.springframework.ui.Model model) removeGroup(Integer groupNumber, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel) removeVoucher(@Valid VoucherForm form, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel) saveCart(SaveCartForm form, org.springframework.validation.BindingResult bindingResult, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel) voidsetBaseSiteService(BaseSiteService baseSiteService) showCart(org.springframework.ui.Model model) updateCartQuantities(long entryNumber, org.springframework.ui.Model model, @Valid UpdateQuantityForm form, org.springframework.validation.BindingResult bindingResult, javax.servlet.http.HttpServletRequest request, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel) updateCartQuantitiesMultiD(Integer entryNumber, String productCode, org.springframework.ui.Model model, @Valid UpdateQuantityForm form, org.springframework.validation.BindingResult bindingResult) Methods inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractCartPageController
clearSessionRestorationData, continueUrl, createProductEntryList, createProductList, getCartFacade, getCheckoutFacade, getSessionService, getSiteConfigService, setupCartPageRestorationData, validateCartMethods inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractPageController
addRegistrationConsentDataToModel, checkRequestUrl, createMetaElement, decodeWithScheme, getCheckoutRedirectUrl, getCmsPageService, getCmsPreviewService, getCmsSiteService, getConfigurationService, getConsentFacade, getContentPageForLabelOrId, getCurrencies, getCurrentCurrency, getCurrentLanguage, getCustomerFacade, getHostConfigService, getI18nService, getLanguages, getMessageSource, getPageTitleResolver, getRequestContextData, getSiteName, getSiteUid, getStoreSessionFacade, getUser, getUserFacade, getViewForPage, getViewForPage, prepareNotFoundPage, setUpMetaData, setUpMetaDataForContentPage, storeCmsPageInModel, storeContentPageTitleInModel, storeContinueUrl, urlEncodeMethods inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
addRequestToModel, getBean
-
Field Details
-
SHOW_CHECKOUT_STRATEGY_OPTIONS
- See Also:
-
ERROR_MSG_TYPE
- See Also:
-
SUCCESSFUL_MODIFICATION_CODE
- See Also:
-
VOUCHER_FORM
- See Also:
-
SITE_QUOTES_ENABLED
- See Also:
-
-
Constructor Details
-
CartPageController
public CartPageController()
-
-
Method Details
-
isCheckoutStrategyVisible
@ModelAttribute("showCheckoutStrategies") public boolean isCheckoutStrategyVisible() -
showCart
@RequestMapping(method=GET) public String showCart(org.springframework.ui.Model model) throws CMSItemNotFoundException - Throws:
CMSItemNotFoundException
-
prepareCartUrl
- Throws:
CMSItemNotFoundException
-
getQuoteUrl
-
cartCheck
@RequestMapping(value="/checkout", method=GET) public String cartCheck(org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel) throws CommerceCartModificationException Handle the '/cart/checkout' request url. This method checks to see if the cart is valid before allowing the checkout to begin. Note that this method does not require the user to be authenticated and therefore allows us to validate that the cart is valid without first forcing the user to login. The cart will be checked again once the user has logged in.- Returns:
- The page to redirect to
- Throws:
CommerceCartModificationException
-
getProductVariantMatrix
-
initCheck
@RequestMapping(value="/checkout/select-flow", method=GET) public String initCheck(org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel, @RequestParam(value="flow",required=false) String flow, @RequestParam(value="pci",required=false) String pci) throws CommerceCartModificationException -
removeGroup
-
updateCartQuantities
@RequestMapping(value="/update", method=POST) public String updateCartQuantities(@RequestParam("entryNumber") long entryNumber, org.springframework.ui.Model model, @Valid @Valid UpdateQuantityForm form, org.springframework.validation.BindingResult bindingResult, javax.servlet.http.HttpServletRequest request, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel) throws CMSItemNotFoundException - Throws:
CMSItemNotFoundException
-
prepareDataForPage
protected void prepareDataForPage(org.springframework.ui.Model model) throws CMSItemNotFoundException - Overrides:
prepareDataForPagein classAbstractCartPageController- Throws:
CMSItemNotFoundException
-
addFlashMessage
protected void addFlashMessage(UpdateQuantityForm form, javax.servlet.http.HttpServletRequest request, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel, CartModificationData cartModification) -
updateCartQuantitiesMultiD
@ResponseBody @RequestMapping(value="/updateMultiD", method=POST) public CartData updateCartQuantitiesMultiD(@RequestParam("entryNumber") Integer entryNumber, @RequestParam("productCode") String productCode, org.springframework.ui.Model model, @Valid @Valid UpdateQuantityForm form, org.springframework.validation.BindingResult bindingResult) -
getOrderEntryData
-
saveCart
@RequestMapping(value="/save", method=POST) public String saveCart(SaveCartForm form, org.springframework.validation.BindingResult bindingResult, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel) throws CommerceSaveCartException - Throws:
CommerceSaveCartException
-
exportCsvFile
@RequestMapping(value="/export", method=GET, produces="text/csv") public String exportCsvFile(javax.servlet.http.HttpServletResponse response, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel) throws IOException - Throws:
IOException
-
applyVoucherAction
@RequestMapping(value="/voucher/apply", method=POST) public String applyVoucherAction(@Valid @Valid VoucherForm form, org.springframework.validation.BindingResult bindingResult, javax.servlet.http.HttpServletRequest request, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) -
removeVoucher
@RequestMapping(value="/voucher/remove", method=POST) public String removeVoucher(@Valid @Valid VoucherForm form, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel) -
getBaseSiteService
- Overrides:
getBaseSiteServicein classAbstractPageController
-
setBaseSiteService
-
executeCartEntryAction
@RequestMapping(value="/entry/execute/{actionCode:.*}", method=POST) public String executeCartEntryAction(@PathVariable(value="actionCode",required=true) String actionCode, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel, @RequestParam("entryNumbers") Long[] entryNumbers) -
getCartPageRedirectUrl
-