Class AddToCartController
- java.lang.Object
-
- de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
-
- de.hybris.platform.b2ctelcoaddon.controllers.misc.AddToCartController
-
@Controller("TelcoAddToCartController") public class AddToCartController extends AbstractControllerController for Add to Cart functionality which is not specific to a certain page.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
AbstractController.HttpNotFoundException
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringSUCCESS-
Fields inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
FORWARD_PREFIX, REDIRECT_PREFIX, ROOT
-
-
Constructor Summary
Constructors Constructor Description AddToCartController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringaddBpoToCart(java.util.List<java.lang.String> simpleProductOfferings, java.lang.String processType, java.lang.String rootBpoCode, int cartGroupNo, java.lang.String subscriptionTermId, java.lang.String subscriberIdentity, java.lang.String subscriberBillingId, org.springframework.ui.Model model)Adds multipleTmaSimpleProductOfferingModelentries to cart, as part of a bundle product offering specified by the given rootBpoCode.java.lang.StringaddpreConfig(java.lang.String preConfig, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel)java.lang.StringaddSpoToBpoConfiguration(java.lang.String productCodePost, long qty, java.lang.String processType, java.lang.String rootBpoCode, java.lang.String currentStep, int rootGroupNumber, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel, java.lang.String query, java.lang.String page)Adds a newTmaSimpleProductOfferingModelentry to cart for the BPO.java.lang.StringaddSpoToCart(java.lang.String productCodePost, java.lang.String processType, long qty, java.lang.String rootBpoCode, int cartGroupNo, java.lang.String subscriptionTermId, java.lang.String subscriberIdentity, java.lang.String subscriberBillingId, org.springframework.ui.Model model)Adds a newTmaSimpleProductOfferingModelentry to cart.protected de.hybris.platform.commercefacades.order.CartFacadegetCartFacade()protected EntryGroupFacadegetEntryGroupFacade()protected de.hybris.platform.commercefacades.product.ProductFacadegetProductFacade()TmaBpoPreConfigFacadegetTmaBpoPreConfigFacade()protected TmaCartFacadegetTmaCartFacade()voidinitBinder(org.springframework.web.bind.WebDataBinder binder)java.lang.StringremoveSpoFromJourneyStep(long entryNumber, java.lang.String bpoCode, java.lang.String groupId, java.lang.String cartGroupNumber, org.springframework.ui.Model model, @Valid UpdateQuantityForm form, org.springframework.validation.BindingResult bindingResult, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel)Removes the SPO added to the journey stepprotected voidsetCartFacade(de.hybris.platform.commercefacades.order.CartFacade cartFacade)voidsetEntryGroupFacade(EntryGroupFacade entryGroupFacade)voidsetProductFacade(de.hybris.platform.commercefacades.product.ProductFacade productFacade)voidsetTmaBpoPreConfigFacade(TmaBpoPreConfigFacade tmaBpoPreConfigFacade)voidsetTmaCartFacade(TmaCartFacade tmaCartFacade)-
Methods inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
addRequestToModel, getBean
-
-
-
-
Field Detail
-
SUCCESS
protected static final java.lang.String SUCCESS
- See Also:
- Constant Field Values
-
-
Method Detail
-
addSpoToCart
@RequestMapping(value="/cart/add", method=POST, produces="application/json") public java.lang.String addSpoToCart(@RequestParam("productCodePost") java.lang.String productCodePost, @RequestParam("processType") java.lang.String processType, @RequestParam(value="qty",required=false,defaultValue="1") long qty, @RequestParam(value="rootBpoCode",required=false) java.lang.String rootBpoCode, @RequestParam(value="cartGroupNo",required=false,defaultValue="-1") int cartGroupNo, @RequestParam(value="subscriptionTermId",required=false) java.lang.String subscriptionTermId, @RequestParam(value="subscriberIdentity",required=false) java.lang.String subscriberIdentity, @RequestParam(value="subscriberBillingId",required=false) java.lang.String subscriberBillingId, org.springframework.ui.Model model)Adds a newTmaSimpleProductOfferingModelentry to cart. The entry can be added as a simple product offering, or also as part of a bundled product offering identified through the rootBpoCode parameter.- Parameters:
productCodePost-ProductModel.CODEprocessType- represents the process flow in the context of which the entry is added to cart (Acquisition, Retention, etc.)qty- quantity to be added;default value is 1rootBpoCode-ProductModel.CODEof the root Bundled Product Offering, as part of which theTmaSimpleProductOfferingModelis addedcartGroupNo- specifies the cart entries group number where the entry to be added too; if -1, then a separate cart entry group is createdsubscriptionTermId- specifies the identifier of the new subscription termsubscriberIdentity- represents subscriber identity for an existing customersubscriberBillingId- represents subscriber billing system id for an existing customermodel- the Spring model- Returns:
- the path for AddToCart popup showing the new added entries
-
addBpoToCart
@RequestMapping(value="/cart/addBpo", method=POST) public java.lang.String addBpoToCart(@RequestParam("simpleProductOfferings") java.util.List<java.lang.String> simpleProductOfferings, @RequestParam("processType") java.lang.String processType, @RequestParam("rootBpoCode") java.lang.String rootBpoCode, @RequestParam(value="cartGroupNo",required=false,defaultValue="-1") int cartGroupNo, @RequestParam(value="subscriptionTermId",required=false) java.lang.String subscriptionTermId, @RequestParam(value="subscriberIdentity",required=false) java.lang.String subscriberIdentity, @RequestParam(value="subscriberBillingId",required=false) java.lang.String subscriberBillingId, org.springframework.ui.Model model)Adds multipleTmaSimpleProductOfferingModelentries to cart, as part of a bundle product offering specified by the given rootBpoCode. The entries can be added under an existing cart entries group indicated by the cartGroupNo parameter, or under a new entry group .- Parameters:
simpleProductOfferings- a list ofProductModel.CODEprocessType- represents the process flow in the context of which the entry is added to cart (Acquisition, Retention, etc.)rootBpoCode-ProductModel.CODEof the root Bundled Product Offering, as part of which theTmaSimpleProductOfferingModelare addedcartGroupNo- specifies the cart entries group number where the entries to be added; if -1, then a separate cart entry group is createdmodel- the Spring model- Returns:
- the link to cart page
-
addSpoToBpoConfiguration
@RequestMapping(value="/cart/addSpo", method=POST, produces="application/json") public java.lang.String addSpoToBpoConfiguration(@RequestParam("productCodePost") java.lang.String productCodePost, @RequestParam(value="qty",required=false,defaultValue="1") long qty, @RequestParam("processType") java.lang.String processType, @RequestParam("rootBpoCode") java.lang.String rootBpoCode, @RequestParam(value="currentStep",required=false) java.lang.String currentStep, @RequestParam(value="rootGroupNumber",required=false,defaultValue="-1") int rootGroupNumber, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel, @RequestParam(value="q",required=false) java.lang.String query, @RequestParam(value="page",required=false) java.lang.String page)Adds a newTmaSimpleProductOfferingModelentry to cart for the BPO. The entry can be added as a simple product offering as a part of a bundled product offering identified through the rootBpoCode parameter and group number if any- Parameters:
productCodePost-ProductModel.CODEqty- quantity to be added;default value is 1processType- represents the process flow in the context of which the entry is added to cart (Acquisition, Retention, etc.)rootBpoCode-ProductModel.CODEof the root Bundled Product Offering, as part of which theTmaSimpleProductOfferingModelis addedcurrentStep- Step id or the group Id from where the SPO is added to the BPOrootGroupNumber- specifies the cart entries group number where the entry to be added too; if -1, then a separate cart entry group is createdmodel- the Spring modelquery- The applied query on pagepage- The page number from which the product is added to the cart- Returns:
- the path for bpo guided selling for the group appended with the group number
-
removeSpoFromJourneyStep
@RequestMapping(value="/cart/removeSpo", method=POST) public java.lang.String removeSpoFromJourneyStep(@RequestParam("entryNumber") long entryNumber, @RequestParam("bpoCode") java.lang.String bpoCode, @RequestParam("groupId") java.lang.String groupId, @RequestParam("cartGroupNumber") java.lang.String cartGroupNumber, org.springframework.ui.Model model, @Valid @Valid UpdateQuantityForm form, org.springframework.validation.BindingResult bindingResult, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel)Removes the SPO added to the journey step- Parameters:
entryNumber- entry number of the cart entry to be updatedgroupId- The groupId of the journeybpoCode- The parent BPO code for the journeycartGroupNumber- specifies the cart entries group number where the entry is to be removed frommodel- page model to be populated with informationform- update quantity form specifying the new quantity of the product from the entry with the number givenbindingResult- request binding result to retrieve validation errors fromredirectModel- redirect model to be populated with information- Returns:
- redirect url to the journey page
-
addpreConfig
@RequestMapping(value="/cart/preconfig/{preConfig}", method=GET) public java.lang.String addpreConfig(@PathVariable("preConfig") java.lang.String preConfig, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel)
-
getCartFacade
protected de.hybris.platform.commercefacades.order.CartFacade getCartFacade()
-
setCartFacade
protected void setCartFacade(de.hybris.platform.commercefacades.order.CartFacade cartFacade)
-
getProductFacade
protected de.hybris.platform.commercefacades.product.ProductFacade getProductFacade()
-
setProductFacade
public void setProductFacade(de.hybris.platform.commercefacades.product.ProductFacade productFacade)
-
getTmaCartFacade
protected TmaCartFacade getTmaCartFacade()
-
setTmaCartFacade
public void setTmaCartFacade(TmaCartFacade tmaCartFacade)
-
getEntryGroupFacade
protected EntryGroupFacade getEntryGroupFacade()
-
setEntryGroupFacade
public void setEntryGroupFacade(EntryGroupFacade entryGroupFacade)
-
getTmaBpoPreConfigFacade
public TmaBpoPreConfigFacade getTmaBpoPreConfigFacade()
-
setTmaBpoPreConfigFacade
public void setTmaBpoPreConfigFacade(TmaBpoPreConfigFacade tmaBpoPreConfigFacade)
-
initBinder
@InitBinder public void initBinder(org.springframework.web.bind.WebDataBinder binder)
-
-