Class AddToCartController

java.lang.Object
de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
de.hybris.platform.b2ctelcoaddon.controllers.misc.AddToCartController

@Controller("TelcoAddToCartController") public class AddToCartController extends AbstractController
Controller for Add to Cart functionality which is not specific to a certain page.
  • Field Details

  • Constructor Details

    • AddToCartController

      public AddToCartController()
  • Method Details

    • addSpoToCart

      @RequestMapping(value="/cart/add", method=POST, produces="application/json") public String addSpoToCart(@RequestParam("productCodePost") String productCodePost, @RequestParam("processType") String processType, @RequestParam(value="qty",required=false,defaultValue="1") long qty, @RequestParam(value="rootBpoCode",required=false) String rootBpoCode, @RequestParam(value="parentEntryNumber",required=false,defaultValue="-1") int parentEntryNumber, @RequestParam(value="subscriptionTermId",required=false) String subscriptionTermId, @RequestParam(value="subscriberIdentity",required=false) String subscriberIdentity, @RequestParam(value="subscriberBillingId",required=false) String subscriberBillingId, org.springframework.ui.Model model)
      Adds a new TmaSimpleProductOfferingModel entry 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.CODE
      processType - 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 1
      rootBpoCode - ProductModel.CODE of the root Bundled Product Offering, as part of which the TmaSimpleProductOfferingModel is added
      parentEntryNumber - specifies the identifier of the cart entry serving as parent for the entry to be added too
      subscriptionTermId - specifies the identifier of the new subscription term
      subscriberIdentity - represents subscriber identity for an existing customer
      subscriberBillingId - represents subscriber billing system id for an existing customer
      model - the Spring model
      Returns:
      the path for AddToCart popup showing the new added entries
    • addBpoToCart

      @RequestMapping(value="/cart/addBpo", method=POST) public String addBpoToCart(@RequestParam("simpleProductOfferings") List<String> simpleProductOfferings, @RequestParam("processType") String processType, @RequestParam("rootBpoCode") String rootBpoCode, @RequestParam(value="parentEntryNumber",required=false,defaultValue="-1") int parentEntryNumber, @RequestParam(value="subscriptionTermId",required=false) String subscriptionTermId, @RequestParam(value="subscriberIdentity",required=false) String subscriberIdentity, @RequestParam(value="subscriberBillingId",required=false) String subscriberBillingId, org.springframework.ui.Model model)
      Adds multiple TmaSimpleProductOfferingModel entries 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 of ProductModel.CODE
      processType - represents the process flow in the context of which the entry is added to cart (Acquisition, Retention, etc.)
      rootBpoCode - ProductModel.CODE of the root Bundled Product Offering, as part of which the TmaSimpleProductOfferingModel are added
      parentEntryNumber - specifies the identifier of the cart entry serving as parent for the new entries to be added to cart
      model - the Spring model
      Returns:
      the link to cart page
    • addSpoToBpoConfiguration

      @RequestMapping(value="/cart/addSpo", method=POST, produces="application/json") public String addSpoToBpoConfiguration(@RequestParam("productCodePost") String productCodePost, @RequestParam(value="qty",required=false,defaultValue="1") long qty, @RequestParam("processType") String processType, @RequestParam("rootBpoCode") String rootBpoCode, @RequestParam(value="currentStep",required=false) String currentStep, @RequestParam(value="parentEntryNumber",required=false,defaultValue="-1") int parentEntryNumber, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel, @RequestParam(value="q",required=false) String query, @RequestParam(value="page",required=false) String page)
      Adds a new TmaSimpleProductOfferingModel entry 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.CODE
      qty - quantity to be added;default value is 1
      processType - represents the process flow in the context of which the entry is added to cart (Acquisition, Retention, etc.)
      rootBpoCode - ProductModel.CODE of the root Bundled Product Offering, as part of which the TmaSimpleProductOfferingModel is added
      currentStep - Step id or the group Id from where the SPO is added to the BPO
      parentEntryNumber - specifies the identifier of the cart entry serving as parent for the new entry to be added too
      model - the Spring model
      query - The applied query on page
      page - 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 String removeSpoFromJourneyStep(@RequestParam("entryNumber") long entryNumber, @RequestParam("bpoCode") String bpoCode, @RequestParam("groupId") String groupId, @RequestParam("parentEntryNumber") String parentEntryNumber, 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 updated
      groupId - The groupId of the journey
      bpoCode - The parent BPO code for the journey
      parentEntryNumber - specifies the identifier of the parent entry where the entry is to be removed from
      model - page model to be populated with information
      form - update quantity form specifying the new quantity of the product from the entry with the number given
      bindingResult - request binding result to retrieve validation errors from
      redirectModel - redirect model to be populated with information
      Returns:
      redirect url to the journey page
    • addpreConfig

      @RequestMapping(value="/cart/preconfig/{preConfig}", method=GET) public String addpreConfig(@PathVariable("preConfig") 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 TmaProductFacade getProductFacade()
    • 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)
    • getCustomerFacade

      public TmaCustomerFacade getCustomerFacade()
    • getTmaOrderEntryFacade

      protected TmaOrderEntryFacade getTmaOrderEntryFacade()
    • getProductOfferFacade

      protected TmaProductOfferFacade getProductOfferFacade()
    • getTmaSubscriptionTermService

      protected TmaSubscriptionTermService getTmaSubscriptionTermService()
    • initBinder

      @InitBinder public void initBinder(org.springframework.web.bind.WebDataBinder binder)